I looked through a couple of questions to find out if the HTML5 element is playing, but cannot find the answer. I have looked at the W3 documentation and I have an event called "play", but I cannot get it to work.
This is my current code:
var stream = document.getElementsByTagName('video'); function pauseStream() { if (stream.playing) { for (var i = 0; i < stream.length; i++) { stream[i].pause(); $("body > header").addClass("paused_note"); $(".paused_note").text("Stream Paused"); $('.paused_note').css("opacity", "1"); } } }
javascript html html5 javascript-events dom-events html5-video video
user1076821 Dec 22 '11 at 3:14 2011-12-22 03:14
source share