AudioInterruptionInfo

data class AudioInterruptionInfo(val type: AudioInterruptionType, val shouldResume: Boolean)

A call, Siri, another app, or audio-focus loss interrupted playback.

AudioSessionManager.attach pauses and resumes streams. A listener is optional extra (UI, logging):

session.attach(stream)
session.observeInterruptions { info -> /* optional */}

Constructors

Link copied to clipboard
constructor(type: AudioInterruptionType, shouldResume: Boolean)

Properties

Link copied to clipboard

true when the interruption ended and the system suggests continuing playback. Always false for AudioInterruptionType.BEGAN.