pauseRecording method
Pauses a video recording.
startRecording
must have been called before.
Call resumeRecording to resume the capture.
Implementation
Future<void> pauseRecording(MediaCapture currentCapture) async {
if (!currentCapture.isVideo) {
throw "Trying to pause a video while currentCapture is not a video (${currentCapture.filePath})";
}
if (currentCapture.status != MediaCaptureStatus.capturing) {
throw "Trying to pause a media capture in status ${currentCapture.status} instead of ${MediaCaptureStatus.capturing}";
}
await CamerawesomePlugin.pauseVideoRecording();
_mediaCapture = MediaCapture.capturing(
filePath: currentCapture.filePath, videoState: VideoState.paused);
}