1

I'm trying to use jQuery to detect when a video has stopped playing.

Previously, I've done this

$("video").bind("ended", function(){ 
     alert('Video Ended'); 
});

but because the video is being added to the DOM from an AJAC call, it doesn't seem to be working.

I've also tried this, but can't get it to work either.

$(document).on('ended', 'video', function(){
     alert('Video Ended');
});
4

0 回答 0