stopVideoRecording method
Stop recording.
Implementation
Future<void> stopVideoRecording() async {
if (!value.isInitialized || _isDisposed) {
throw CameraException(
'Uninitialized CameraController',
'stopVideoRecording was called on uninitialized CameraController',
);
}
if (!value.isRecordingVideo) {
throw CameraException(
'No video is recording',
'stopVideoRecording was called when no video is recording.',
);
}
try {
value = value.copyWith(isRecordingVideo: false);
await _channel.invokeMethod<void>(
'stopVideoRecording',
<String, dynamic>{'textureId': _textureId},
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message!);
}
}