SpeakerManager

class SpeakerManager(val mediaManager: MediaManagerImpl, val microphoneManager: MicrophoneManager, val initialVolume: Int? = null)

Constructors

Link copied to clipboard
constructor(mediaManager: MediaManagerImpl, microphoneManager: MicrophoneManager, initialVolume: Int? = null)

Properties

Link copied to clipboard
val devices: StateFlow<List<StreamAudioDevice>>
Link copied to clipboard
val initialVolume: Int? = null
Link copied to clipboard
val isEnabled: StateFlow<Boolean>

Represents whether the speakerphone is enabled

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: StateFlow<DeviceStatus>
Link copied to clipboard
val volume: StateFlow<Int?>

Functions

Link copied to clipboard
fun disable(fromUser: Boolean = true)
Link copied to clipboard
fun pause()
Link copied to clipboard
fun resume()
Link copied to clipboard
fun setEnabled(enabled: Boolean, fromUser: Boolean = true)

Enable or disable the speakerphone.

Link copied to clipboard
fun setSpeakerPhone(enable: Boolean, defaultFallback: StreamAudioDevice? = null)

Enables or disables the speakerphone.

Link copied to clipboard
fun setVolume(volumePercentage: Int)

Set the volume as a percentage, 0-100