Audio Interactions
Speaker Interactions
Note: The camera should have already started streaming LiveView before making any interactions
To listen to the current status of the camera speaker, The following can be used:
viewModelScope.launch {
client.isSpeakerEnabled.collectLatest { isEnabled ->
// isEnabled will report the current status of the speaker if its on or not.
}
}
To toggle the Speaker, The following can be used:
client.enableSpeaker(true)
Microphone Interactions
Note: The camera should have already started streaming LiveView before making any interactions
To listen to the current status of the camera microphone, The following can be used:
viewModelScope.launch {
client.isMicEnabled.collectLatest { isEnabled ->
// isEnabled will report the current status of the microphone if its on or not.
}
}
To toggle the Microphone, The following can be used:
client.enableMic(true)