I have a you tube video embedded in a slide layer as a web object. Is there a way, short of setting the timeline to the length of the video, to automatically jump to the next slide when the you tube video ends?
You have to create a function that is listening for the video to end. We are using a standard video tag so for me it is:
<video id=myvid...rest of the tag goes here></video>
var vid = document.getElementById("myvid");
vid.onended = function() { var player = parent.GetPlayer(); player.SetVar("videoEnd", 'yes'); }
In storyline you have a variable "videoEnd" when changed to "yes" triggers next slide. I use String variables because I have had no luck getting Booleans true/false to work.
.onended is what you would need to figure out for YouTube videos. Not sure it would be the same.
2 Replies
You have to create a function that is listening for the video to end. We are using a standard video tag so for me it is:
<video id=myvid...rest of the tag goes here></video>
var vid = document.getElementById("myvid");
vid.onended = function() {
var player = parent.GetPlayer();
player.SetVar("videoEnd", 'yes');
}
In storyline you have a variable "videoEnd" when changed to "yes" triggers next slide. I use String variables because I have had no luck getting Booleans true/false to work.
.onended is what you would need to figure out for YouTube videos. Not sure it would be the same.
Looks like the YouTube video events are spelled out here: https://www.htmlgoodies.com/beyond/video/respond-to-embedded-youtube-video-events.html
This discussion is closed. You can start a new discussion or contact Articulate Support.