Return to Snippet

Revision: 65515
at December 11, 2013 07:20 by darith


Updated Code
$('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();
	});
});

Revision: 65514
at December 11, 2013 07:10 by darith


Initial Code
$('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();
				});
			});

Initial URL


Initial Description
stop other videos playing, HTML5 and flash

Initial Title
video.js simultaneous videos playing - pause or stop other videos HTML5 flash

Initial Tags


Initial Language
ActionScript 3