HTML5 Canvas Video Events Not Working
I've been having a lot of trouble handling some simple video events with an HTML5 video element in the stage (instance name "video_1" in Animate).
I have a Main Menu button go to Frame 2 where there is an embedded video player. I want to create a function that will return to the Main Menu when the video finishes playing.
However nothing I'm trying is working:
_this.video_1.addEventListener('ended', videoEvent, false);
function videoEvent(e){
console.log("video ended!");
}
I tried a lot of different ways to do this.. I can't seem to get anything to trigger
Even using the Code Wizard to create a basic function doesn't seem to ever trigger anything.
var _this = this;
_this.video_1.on('added', function() {
/*
Mute/Unmute the selected video.
*/
$('#video_1')[0].muted = true;
console.log("video muted");
}, _this, true);
Anyone have any pointers for me to get this to work? Thanks!
