resumeRecording method

Future<void> resumeRecording(
  1. MediaCapture currentCapture
)

Resumes a video recording. pauseRecording must have been called before.

Implementation

Future<void> resumeRecording(MediaCapture currentCapture) async {
  if (!currentCapture.isVideo) {
    throw "Trying to pause a video while currentCapture is not a video (${currentCapture.captureRequest.when(
      single: (single) => single.file!.path,
      multiple: (multiple) => multiple.fileBySensor.values.first!.path,
    )})";
  }
  if (currentCapture.status != MediaCaptureStatus.capturing) {
    throw "Trying to pause a media capture in status ${currentCapture.status} instead of ${MediaCaptureStatus.capturing}";
  }
  await CamerawesomePlugin.resumeVideoRecording();
  _mediaCapture = MediaCapture.capturing(
    captureRequest: currentCapture.captureRequest,
    videoState: VideoState.resumed,
  );
}