android_enableSpeakerphone method
@platform android
@detail api
@author luomingkang
@brief Turns on/off the speaker after joining a game room.
@param enable Whether to turn on the speaker:
- true: Turns on the speaker and subscribes to audio streams of all remote users.
- false: Default setting. Turns off the speaker and unsubscribes audio streams from all remote users.
@return
- 0: Success.
- -3: Failure. Not joined a room.
Implementation
Future<int?> android_enableSpeakerphone(bool enable) async {
$() => ($instance as $p_a.RTCRoom).enableSpeakerphone(enable);
if (Platform.isAndroid) {
return $();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}