HTML5 Video Stop onClose

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-05-21T02:28:04Z Indexed on 2010/05/21 2:30 UTC
Read the original article Hit count: 359

Filed under:
|
|
|

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 video to stop when I close the overlay? Here's the code I have:

$("img[rel]").overlay({ onClose: function() { //stop the video somehow }, mask: { color: '#000', opacity: 0.7 }});

I tried using

$('video').pause();

But this paused the overlay as well.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html5