首页 > HTML5 如何判断网页中视频是否完全加载完毕?

HTML5 如何判断网页中视频是否完全加载完毕?

视频是用html5的video标签放的

<div class="media">
    <video autoplay="" loop="" id="videos">
        <source src="http://stg.shinetech.likvm.com/sites/stg/files/video/Shinetech-Final_Compress.ogv">
        <source src="http://stg.shinetech.likvm.com/sites/stg/files/video/Shinetech-Final_Compress.MP4">
        Your browser does not support the Video tag.
    </video>
</div>

videoElem.addEventListener('canplaythrough',function(){});

http://www.w3schools.com/tags/av_event_canplaythrough.asp

【热门文章】
【热门文章】