Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.5.0
-
None
-
None
-
iOS 7, Android 4.4
Description
I use the capture plugin to record a video from the device's camera. Upon completion of recording, I'd like to get the duration of the video for use in my application. However, when I run this test on my iPad or Android phone, the MediaFileData object contains zero-ed out information. Here's a snippet:
navigator.device.capture.captureVideo( function(files) { var videoFile = files[0]; videoFile.getFormatData(function(fileData) { console.log('file data:' + JSON.stringify(fileData)); }); } );
The console output is:
file data:{"width":0,"duration":0,"bitrate":0,"codecs":null,"height":0}
As best as I can tell, I'm using this correctly. Is there something I'm missing, or can this not be used for newly-created media?