changeEncoding method
Future<void>
changeEncoding({
- required String? videoUri,
- required String? outputPath,
- required OnEditResult onResult,
- required OnEditError onError,
- int? width,
- int? height,
- TruvideoSdkVideoFrameRate frameRate = TruvideoSdkVideoFrameRate.defaultFrameRate,
override
Implementation
@override
Future<void> changeEncoding({
required String? videoUri,
required String? outputPath,
required OnEditResult onResult,
required OnEditError onError,
int? width,
int? height,
TruvideoSdkVideoFrameRate frameRate =
TruvideoSdkVideoFrameRate.defaultFrameRate,
}) async {
try {
final config = jsonEncode({
'height': height,
'width': width,
'framesRate': frameRate.name,
});
final result = await methodChannel.invokeMethod('encodeVideo', {
'videoUri': videoUri,
'resultPath': outputPath,
'config': config,
});
onResult(result.toString());
} on PlatformException catch (e) {
onError(e.message);
}
}