setAudioRoute method
- int route
Set audio route, i.e., earpiece at the top or speaker at the bottom (supports only the Android and iOS platforms)
The hands-free mode of video call features in WeChat and Mobile QQ is implemented based on audio routing. Generally, a mobile phone has two speakers: one is the receiver at the top with low volume, and the other is the stereo speaker at the bottom with high volume. The purpose of setting audio routing is to determine which speaker will be used.
Parameters:
route Audio route, i.e., whether the audio is output by speaker or receiver. For more information, please see TRTCCloudDef.TRTC_AUDIO_ROUTE_SPEAKER. Default value: TRTCCloudDef.TRTC_AUDIO_ROUTE_SPEAKER
Implementation
Future<void> setAudioRoute(
int route // Audio route, i.e., whether the audio is output by speaker or receiver
) {
return _channel.invokeMethod('setAudioRoute', {
"route": route,
});
}