Checking if a html5 video is ready

前端 未结 5 1990
孤街浪徒
孤街浪徒 2020-11-30 21:44

is there an JavaScript event triggered, if a HTML5 video is ready for playback?

5条回答
  •  萌比男神i
    2020-11-30 21:54

    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.

提交回复
热议问题