AudioFocusHandler

@Singleton()
open class AudioFocusHandler @Inject() constructor(context: Context) : AudioHandler

A basic AudioHandler that manages audio focus while started.

Constructors

AudioFocusHandler
Link copied to clipboard
@Inject()
fun AudioFocusHandler(context: Context)

Functions

createAudioRequest
Link copied to clipboard
@RequiresApi(value = 26)
open fun createAudioRequest(): AudioFocusRequest
Creates the request used when requesting audio focus.
start
Link copied to clipboard
open override fun start()
Called when a room is started.
stop
Link copied to clipboard
open override fun stop()
Called when a room is disconnected.

Properties

audioAttributeContentType
Link copied to clipboard
var audioAttributeContentType: Int
The audio attribute content type to use when requesting audio focus on devices O and beyond.
audioAttributeUsageType
Link copied to clipboard
var audioAttributeUsageType: Int
The audio attribute usage type to use when requesting audio focus on devices O and beyond.
audioStreamType
Link copied to clipboard
var audioStreamType: Int
The audio stream type to use when requesting audio focus on pre-O devices.
focusMode
Link copied to clipboard
var focusMode: Int
The audio focus mode to use while started.
onAudioFocusChangeListener
Link copied to clipboard
Set this to listen to audio focus changes.

Sources

SDK source
Link copied to clipboard