[英]How do I play back CENC-encrypted MP4 video using the HTML5 <video> tag?
[英]html5 video tag failed to play .mp4 videos in phonegap android with cordova 2.9.0 and jquery1.9.0 ?
我正在嘗試播放已經在我的項目路徑中添加的本地視頻文件: ASSETS / WWW / VIDEOS / xyz.mp4,現在使用標簽,但收到警告:
我在HTML中添加了代碼:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<div data-role="page" data-theme="a" class="my-page" id="video">
<video id="video_player" src="#" controls="controls"></video>
</div>
</body>
</html>
**in js:**
$(document).on('pagebeforeshow',"#video", function () {
xyz = document.getElementById('video_player');
alert("values xyz:" + xyz);
xyz.src = data[curYear].video.url;
alert("xyz after src:" + xyz.src);
xyz.play();
});
嘗試這個..
<video class="video" poster="/assets/video/posters/example.jpg" controls width="768" height="432" preload="none">
<source src="/assets/video/example.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="/assets/video/example.ogv" type='video/ogg; codecs="theora, vorbis"' />
</video>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.