/ Published in: ActionScript 3
stop other videos playing, HTML5 and flash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('audio,video').bind('play', function() { activated = this; $('audio,video').each(function() { if(this != activated) this.pause(); }); }); //flash - prevent simultaneous video playback - pauses other playing videos upon play $(".video-js").click(function(){ activated = this; $('.video-js').each(function() { if(this != activated) _V_($(this).attr("id")).pause(); }); });