interruptionFlow
Audio interruptions as a cold Flow.
Collecting registers AudioSessionManager.observeInterruptions. Listeners fan out, so this does not replace a host callback or another collector. Cancelling the collector calls AudioSessionManager.clearInterruptions for this collector only.
JVM, JS, and desktop never emit. Android needs bind(context) then AudioSessionManager.setActive; Apple uses session interruptions.
session.attach(stream)
session.interruptionFlow().collect { info ->
// UI / logging; attach() already paused or resumed the stream
}Content copied to clipboard