The canplay/canplaythrough events for an HTML5 video are not called on Firefox. Why?

前端 未结 8 1323
自闭症患者
自闭症患者 2020-12-15 17:23

I\'m building a jQuery plugin for managing HTML5 videos. I\'m trying to capture the canplay and canplaythrough events. In Chrome, the event is fired without problem. In Fire

8条回答
  •  爱一瞬间的悲伤
    2020-12-15 18:08

    Adding:

    var video = $('video');
    video.trigger('load');
    

    After adding the canplaythrough event listener fixed it for me on Firefox and Safari.

提交回复
热议问题