pauseVideoRecording method
Pause video recording. Only supports Android This feature is only available on iOS and Android sdk 24+.
Implementation
Future<void> pauseVideoRecording() async {
if (!value.isInitialized! || _isDisposed) {
throw CameraException(
'Uninitialized CameraController',
'pauseVideoRecording was called on uninitialized CameraController',
);
}
if (!value.isRecordingVideo!) {
throw CameraException(
'No video is recording',
'pauseVideoRecording was called when no video is recording.',
);
}
if(value.isRecordingPaused){
throw CameraException(
'No video is pause',
'pauseVideoRecording was called when no video is recording.',
);
}
if (!Platform.isAndroid) {
throw CameraException(
'Unsupported platforms.',
'pauseVideoRecording Only supports Android.',
);
}
try {
value = value.copyWith(isRecordingPaused: true);
await _channel.invokeMethod<void>(
'pauseVideoRecording',
<String, dynamic>{},
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
}