Copy link to clipboard
Copied
I added a video as a DOM, it works wonderfully, triggers when I need it to, but I cant find a way to listen to when the video is finished.
Traditional myVideo.addEventListener('ended', handledEnded etc does not seem to work
I couldnt find anything in createjs reference pertaining to video events. Could anyone advise?
Thank you!
That is indeed the correct way to check for a media file ending. How are you setting the value of "myVideo"? You should be doing something like this:
var myVideo = document.getElementById("thisismyvideofile");
If you're using the HTML components, Animate sets the ID of the video element to the same as the instance name.
You should also set an "error" listener pointing to the same handler as "ended", so people don't get stuck if video playback fails.
Copy link to clipboard
Copied
Moved out of the Forum Lounge (not for technical support) and over to the Adobe Animate CC - General forum.
Copy link to clipboard
Copied
That is indeed the correct way to check for a media file ending. How are you setting the value of "myVideo"? You should be doing something like this:
var myVideo = document.getElementById("thisismyvideofile");
If you're using the HTML components, Animate sets the ID of the video element to the same as the instance name.
You should also set an "error" listener pointing to the same handler as "ended", so people don't get stuck if video playback fails.
Copy link to clipboard
Copied
ok, I was doing exactly that, but I goofed up and was setting up event listener on the div id, no the video id. Thank you for help!