Skip to main content
rickg1949
Known Participant
November 7, 2021
Question

Listener for end of video playback

  • November 7, 2021
  • 0 replies
  • 138 views

I have done this several times before, about two years ago. Simple HTML5 touch screen interactive to play a selection of MP4's. When each video finished it would return to screen with selection buttons. But now, when the videos finish it just hangs on video player frame.

 

Here is my test: https://rickgodin.net/test2/test2.html 

 

Here is the movie end listener code I'm using:

this.stop();

var root = this;

this.movie1.on("added", function() {

$("#movie1").on("ended", function() {

movetoMenu();

});

});

function movetoMenu() {
console.log("go back to menu");
root.gotoAndStop(0);
}

 

If I did this more than every 2 years I am sure I would remember the trick.

 

Thanks in advance, rg

This topic has been closed for replies.