0

How do you get the amount of time a video has been being recorded while it is being recorded.

I have looked on google for a solution and have found nothing.

  • You can save the time when the recording starts, and then compare the current time to that one – Abe Mar 23 '23 at 21:38

1 Answers1

0
try{

let options = {
      mediaType: type,
      minWidth: 1000,
      minHeight: 1000,
      quality: 1,
      videoQuality: 'low',
      durationLimit: 30, //Video max duration in seconds
      saveToPhotos: true,
      // selectionLimit: 2,
    };
let isCameraPermitted = await requestCameraPermission();
    let isStoragePermitted = await requestExternalWritePermission();
    if (isCameraPermitted && isStoragePermitted) {
      launchCamera(options, response => {
        console.log('Response = ', response);

        if (response.didCancel) {
          // alert('User cancelled camera picker');
          return;
        } else if (response.errorCode == 'camera_unavailable') {
          // alert('Camera not available on device');
          return;
        } else if (response.errorCode == 'permission') {
          // alert('Permission not satisfied');
          return;
        } else if (response.errorCode == 'others') {
          // alert(response.errorMessage);
          return;
        }


      })
        .then(res => {
       console.log("Result:",res);
      }).catch(e=>console.log('e:',e));


}catch(err){
console.log("error:",err);
}
Kishan
  • 106
  • 6