enableOriginalAspectRatio method

  1. @override
Future<bool> enableOriginalAspectRatio(
  1. bool enable
)

This function is used to set the aspect ratio of the video sent out.
enable true if you want to enable the original aspect ratio.
Return true if successful, otherwise false Remark: If session is using video source and data_mode is not VideoSourceDataMode_None, default always use original aspect ration of video.

Implementation

@override
Future<bool> enableOriginalAspectRatio(bool enable) async {
  var params = <String, dynamic>{};
  params.putIfAbsent("enable", () => enable);
  return await methodChannel
      .invokeMethod<bool>('enableOriginalAspectRatio', params)
      .then<bool>((bool? value) => value ?? false);
}