compressVideo static method

Future<String> compressVideo({
  1. required String videoPath,
  2. required VideoCompressionOptions options,
  3. String? compressionId,
})

Compress video

Implementation

static Future<String> compressVideo({
  required String videoPath,
  required VideoCompressionOptions options,
  String? compressionId,
}) async {
  final result = await _channel.invokeMethod('compressVideo', {
    'videoPath': videoPath,
    'options': options.toMap(),
    'compressionId': compressionId,
  });

  if (result is String) {
    return result;
  } else {
    throw Exception('Invalid response from native code: $result');
  }
}