Video Stop Event

Problem:

Via a menu I start different full screen videos in different scenes. After the video is finished I want to return to the main menu. At the moment I solve this via the event “Jump to Scene” after a defined time or via a button.

Is it possible to query an event (“video player stop” or “end of video”) to get to the main menu?

Saola Animate version: Saola Animate Pro 2.7.1
OS: Windows 10

Hi,

Saola Animate doesn’t support video ended event yet.
But you can do that with JavaScript.
For example, you can handle Scene Activate event, add script to listen to the video ended event:

function onSceneActivated(doc, e) {
  doc.getElement('video element name').mediaDom.addEventListener('ended', function() {
    doc.showScene('destination scene name');
  }, false);
}

Regards

That’s exactly what I was looking for, thanks for the tip!

Regards