码迷,mamicode.com
首页 > 其他好文 > 详细

记一些常用的video事件

时间:2020-04-10 12:07:38      阅读:82      评论:0      收藏:0      [点我收藏+]

标签:etc   expec   end   html   int   eterm   pause   app   nload   

之前对html的video标签有过一阵子研究,主要用来判断视频文件在播放时事件触发的顺序。

罗列了下实际有用的事件属性:

loadstart: happened after load() method. The UA begins looking for media data.
durationchange: get the duration info of the media
loadedmetadata: The UA has determined the duration and dimesion(元数据包括:时长,尺寸以及文本轨道)
loadeddata: 当前帧数据可用,for the first time
progress: The UA is fetching media data
canplay: 可以播放当前及至少下一帧是可以播放的, readyState is newly to HAVE_Future_DATA
canplaythrough: readyState is newly to HAVE_ENOUGH_DATA
play: paused is newly false, after()
pause: paused is newly true
playing: playback is ready to start after having been paused or delayed due to lack of media data(readyState is equal to or greater than HAVE_FUTURE_DATA)
abort: UA stops fetching media data before it is completely download but not due to an error
waiting: Playback has stopped because the next frame is not available but UA expects that frame to become avaiable in due course
suspend: UA is intentionally not fetching media data currently

记一些常用的video事件

标签:etc   expec   end   html   int   eterm   pause   app   nload   

原文地址:https://www.cnblogs.com/jlfw/p/12672264.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!