getCurrentAudioOutputRoute method

  1. @override
Future<ZoomVideoSdkAudioDevice> getCurrentAudioOutputRoute()

Get the current audio output route.
The function is only available for iOS platform.
Return the current audio output route if the function succeeds.

Implementation

@override
Future<ZoomVideoSdkAudioDevice> getCurrentAudioOutputRoute() async {
  if (!Platform.isIOS) {
    throw UnimplementedError('getCurrentAudioOutputRoute() is only implemented for iOS.');
  }
  var audioDeviceString = await methodChannel
      .invokeMethod<String?>('getCurrentAudioOutputRoute')
      .then<String?>((String? value) => value);

  Map<String, dynamic> audioDeviceMap = jsonDecode(audioDeviceString!);
  ZoomVideoSdkAudioDevice audioDevice =
  ZoomVideoSdkAudioDevice.fromJson(audioDeviceMap);
  return audioDevice;
}