HTML5 Video Stop onClose

后端 未结 9 865
暗喜
暗喜 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条回答
  •  一整个雨季
    2020-12-10 12:13

    Someone already has the answer.

    $('video') will return an array of video items. It is totally a valid seletor!

    so

    $("video").each(function () { this.pause() });
    

    will work.

提交回复
热议问题