Today I started playing with the phone. When I tried to capture the video, it worked perfectly. Now I want to show the captured video in a web view. so I tried as shown below.
var captureSuccess = function(mediaFiles) {
var i, path, len;
for (i = 0, len = mediaFiles.length; i < len; i += 1) {
path = mediaFiles[i].fullPath;
videoString = "<video width='320' height='240' controls='controls'><source src="+path+" type='video/mp4' /> <source src="+path+" type='video/ogg' /> <source src="+path+" type='video/webm' />Your browser does not support the video tag.</video>";
$('#myVideo').html(videoString);
}
};
var captureError = function(error) {
navigator.notification.alert('Error code: ' + error.code, null, 'Capture Error');
};
function takeVideo(){
navigator.device.capture.captureVideo(captureSuccess, captureError, {limit:1});
}
but in the user interface I see that the player is being added, but it only plays audio, not video. WOT could be the problem. ??
Any help is appreciated and thanks for your time in advance.
source
share