setEnableSpeakerphone abstract method
Enables/Disables the audio playback route to the speakerphone. This method sets whether the audio is routed to the speakerphone or earpiece. After a successful method call, the SDK triggers the audioRouteChanged callback. Ensure that you have joined a channel before calling this method.
Param speakerOn
Whether the audio is routed to the speakerphone or earpiece. true: Route the audio to the speakerphone. If the device connects to the earpiece or Bluetooth, the audio cannot be routed to the speakerphone.
false: Route the audio to the earpiece. If a headset is plugged in, the audio is routed to the headset.
Implementation
Future<void> setEnableSpeakerphone(bool speakerOn);