build method
Implementation
Future<EncodeBuilder> build() async {
await TruvideoVideoSdk.changeEncoding(
videoUri: filePath,
outputPath: resultPath,
width: int.tryParse(_width),
height: int.tryParse(_height),
frameRate: TruvideoSdkVideoFrameRate.values.firstWhere(
(e) => e.toString().split('.').last == _frameRate,
orElse: () => TruvideoSdkVideoFrameRate.defaultFrameRate,
),
onResult: (res) {
if (res != null) _encodeData = VideoRequestDetails.fromJsonString(res);
},
onError: (err) {
throw Exception('Encode build failed: $err');
},
);
return this;
}