pauseVideoRecording method
Pause video recording.
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.',
);
}
try {
value = value.copyWith(isRecordingPaused: true);
await _channel.invokeMethod<void>(
'pauseVideoRecording',
<String, dynamic>{'textureId': _textureId},
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
}