Skip to content Skip to sidebar Skip to footer

Html 5 Video Onended Event Not Firing

I'm trying to react to the HTML 5 onended event for the video tag without success. In the code snippet below I added the mouseleave event to be sure the jQuery code is correct and

Solution 1:

Make sure you're binding to the ended event instead of onended, always leave the on out when binding with jQuery, for example you couldn't do .on("onclick"), you'd do .on("click").

If it helps, there's a full listing of available events for the <video> element here: http://www.w3.org/2010/05/video/mediaevents.html

Solution 2:

I was searching for the answer for this too. Here's what worked for me in for the jQuery mobile framework:

$(document).ready(function(){
  $("#idname").bind('ended', function(){
  $.mobile.changePage($('#idofpageyouwantogoto'), 'fade');
  });
});

Post a Comment for "Html 5 Video Onended Event Not Firing"