setAudioRoute method
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. Reference: TXAudioRoute
Implementation
Future<int?> setAudioRoute(int route) async {
var result = await _channel.invokeMethod('setAudioRoute', {
"route": route,
});
return V2TXLiveFlutterResult.intValue(result);
}