【发布时间】:2014-04-06 11:23:44
【问题描述】:
我在 Android Webview 上使用标签。这是代码:
<div class="video-wrapper">
<video id="video" class="video-full-screen" preload="none" webkit-playsinline poster={poster url here}>
<source id="mp4" src="{Video Source here}" type="video/mp4">
<p>Your user agent does not support the HTML5 Video element.</p>
</video>
</div>
我注册了以下视频事件:
var video = $('video');
video.bind("canplay", function(){
console.log("canplay");
});
video.bind("playing", function(){
console.log("playing");
});
video.bind("waiting", function(){
console.log("waiting");
});
video.bind("ended", function(){
console.log("ended");
});
video.bind("canplay", function(){
console.log("canplay");
});
当我在按下视频海报之前断开互联网时,我收到以下事件(点击海报后):
“等待”
“可以玩”
“玩”
“结束”
所有这些事件都在几秒钟内发生(视频未播放)。在三星 Galaxy S4 4.2.2 上测试。
这明明是某种包? (在 iOS / Nexus 4、Android 4.4 上不会发生)
【问题讨论】:
标签: javascript android html webview html5-video