您如何获得视频在录制时已录制的时间量。我在Google上寻找解决方案,但没有找到。
7gyucuyw1#
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); }
1条答案
按热度按时间7gyucuyw1#