setVideoSettings method

Future<void> setVideoSettings({
  1. int? bitrate,
  2. int? width,
  3. int? height,
  4. int? frameInterval,
  5. String? profileLevel,
})

set video Settings Only supports ios

Implementation

Future<void> setVideoSettings({int? bitrate,int? width,int? height, int? frameInterval, String? profileLevel}) async {
  if (!value.isInitialized! || _isDisposed) {
    throw CameraException(
      'Uninitialized CameraController',
      'setVideoSettings was called on uninitialized CameraController',
    );
  }
  if (!Platform.isIOS) {
    throw CameraException(
      'Unsupported platforms.',
      'setVideoSettings Only supports Ios.',
    );
  }
  try {
    await _channel.invokeMethod<void>(
      'setVideoSettings',
      <String, dynamic>{
        "bitrate": bitrate,
        "width": width,
        "height": height,
        "frameInterval": frameInterval,
        "profileLevel": profileLevel
      },
    );
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}