SpeakerManager
class SpeakerManager(val mediaManager: MediaManagerImpl, val microphoneManager: MicrophoneManager, val initialVolume: Int? = null, val audioUsageProvider: () -> Int = { defaultAudioUsage })
Constructors
Link copied to clipboard
constructor(mediaManager: MediaManagerImpl, microphoneManager: MicrophoneManager, initialVolume: Int? = null, audioUsageProvider: () -> Int = { defaultAudioUsage })
Properties
Functions
Link copied to clipboard
Set the audio usage value. This allows toggling between USAGE_MEDIA and USAGE_VOICE_COMMUNICATION. Updates the StateFlow immediately for responsive UI, then attempts to update the ADM. If the ADM update fails, the StateFlow is rolled back to the previous value.
Link copied to clipboard
Enable or disable the speakerphone.
Link copied to clipboard
Enables or disables the speakerphone.