I've been playing around with MediaElement.js for a while now and have a new application that uses 20 players on a single page. I'd like to be able to have the songs stop when another one is played - and not to overlap the tracks when they are playing. I can't seem to find an easy way to hack this - perhaps someone knows of a way?
Thanks.
In jQuery, you could do
$('video,audio').each(function() {
$(this)[0].pause();
});
Let me know if that works.
A quick and dirty one ;)
$(".mejs-play").live('click',function(){
$(".mejs-pause").trigger('click');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With