I\'ve looked through a couple of questions to find out if an HTML5 element is playing, but can\'t find the answer. I\'ve looked at the W3 documentation and it has an event n
var video_switch = 0; function play() { var media = document.getElementById('video'); if (video_switch == 0) { media.play(); video_switch = 1; } else if (video_switch == 1) { media.pause(); video_switch = 0; } }