unable to record more than 30 second video with navigator.device.capture.captureVideo

28 views
Skip to first unread message

Kashif Rafi

unread,
Jun 6, 2017, 4:08:34 PM6/6/17
to phonegap
i am trying to record and play the video in phonegap build android app, whatever i do it records only 30 second video, i tried to record without specifying duration parameter but still it records only 30 second video, i am using amazon fire phone, here is my code.

var captureSuccessVid = function(mediaFiles) {
   
var i, path, len;
   
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
     path
= mediaFiles[i].fullPath;
     
var cont = document.getElementById('videos');
     
var vid = document.createElement('video');
     vid
.src = path;
     cont
.appendChild(vid);
     vid
.play();
   
}
 
};

var captureError = function(error) {
   navigator
.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
 
navigator
.device.capture.captureVideo(captureSuccessVid, captureError, {limit:1, quality:0, duration: 60});

Kerri Shotts

unread,
Jun 7, 2017, 1:48:50 PM6/7/17
to phonegap
What version of Cordova (CLI), cordova-android, and plugins are you using? What device(s) and OS version(s) have you tested on? Do you receive any error messages? Have you tried viewing the device's console (adb logcat)?

Kashif Rafi

unread,
Jun 7, 2017, 2:01:11 PM6/7/17
to phonegap
Cordova = cli-6.5.0
plugin = cordova-plugin-media-capture
device = Amazon Fire Phone
OS = Fire OS 4.6.6.1

I didn't received any error message and there was nothing in device's console.

Kerri Shotts

unread,
Jun 8, 2017, 9:55:52 PM6/8/17
to phonegap
Can you duplicate on another Android device or emulator? Not sure many of us have Fire OS devices (I don't), so there's not a lot of opportunity to repro.
Reply all
Reply to author
Forward
0 new messages