HTML5 Video Stop onClose

后端 未结 9 881
暗喜
暗喜 2020-12-10 11:23

I\'m using jQuery tools for an overlay. Inside the overlay I have an HTML5 video. However, when I close the overlay, the video keeps playing. Any idea how I might get the vi

9条回答
  •  旧时难觅i
    2020-12-10 12:06

    Try this:

    if ($.browser.msie)
    {
       // Some other solution as applies to whatever IE compatible video player used.
    }
    else
    {
       $('video')[0].pause();
    }
    

    But, consider that $.browser is deprecated, but I haven't found a comparable solution.

提交回复
热议问题