Executing function at end of html5 video Executing function at end of html5 video jquery jquery

Executing function at end of html5 video


For your paste & copy pleasure the jQuery solution:

<video width="320" height="240">  <source src="movie.mp4" type="video/mp4"></video><script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><script>/*<![CDATA[*/  $(document).ready(function(){    $('video').on('ended',function(){      console.log('Video has ended!');    });  });/*]]>*/</script>