setHandsFree method

  1. @override
Future<void> setHandsFree(
  1. bool isHandsFree
)
override

Implementation

@override
Future<void> setHandsFree(bool isHandsFree) {
  if (isHandsFree) {
    return txDeviceManager
        .setAudioRoute(TRTCCloudDef.TRTC_AUDIO_ROUTE_SPEAKER);
  } else {
    return txDeviceManager
        .setAudioRoute(TRTCCloudDef.TRTC_AUDIO_ROUTE_EARPIECE);
  }
}