检查html5视频是否准备就绪 [英] Checking if a html5 video is ready
本文介绍了检查html5视频是否准备就绪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有JavaScript事件触发,如果HTML5视频已准备好播放?
is there an JavaScript event triggered, if a HTML5 video is ready for playback?
推荐答案
我认为准备回放意味着 readyState
属性是等于 HAVE_ENOUGH_DATA
常数(数值4)。根据 doc ,当readyState属性转向这个值, canplay
事件应该被触发。
I assume that ready for playback means that the readyState
property is equal to HAVE_ENOUGH_DATA
constant (numeric value 4). According to the doc, when the readyState property turn to this value, a canplay
event should be fired.
这篇关于检查html5视频是否准备就绪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文