digitalhydra
12/13/2013 - 9:22 PM

detect end of html5 video

detect end of html5 video

<video src="video.ogv">
     video not supported
</video>
then you can use:

<script>
    var video = document.getElementsByTagName('video')[0];

    video.onended = function(e) {
      /*Do things here!*/
    }
</script>