Checking if a html5 video is ready

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

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

5条回答
  •  半阙折子戏
    2020-11-30 22:09

    You have 2 events to handle when a video is ready to play.

    • canplay: fired when video ready to play but buffering not complete
    • canplaythrough : fired when video ready to play and buffering complete

提交回复
热议问题