setAudioRoute method
Implementation
void setAudioRoute(bool isSoundOnSpeaker) {
RoomStore.to.audioSetting.isSoundOnSpeaker.value = isSoundOnSpeaker;
TUIAudioRoute route =
isSoundOnSpeaker ? TUIAudioRoute.speakerphone : TUIAudioRoute.earpiece;
return _roomEngine.getMediaDeviceManager().setAudioRoute(route);
}