Forum Discussion
Embedded YouTube video, next button & Javascript
Hi All,
I have a YouTube video embedded as a web object into Storyline. Since Storyline cannot determine the duration of the video, I need to have the next button appear when the video ends. I have searched the discussions and cannot figure this out, as it requires some JavaScript knowledge. Are there any JavaScript gurus out there that can help me.
- RobertGiebitzCommunity Member
I'm having a similar problem with an embedded video (though not YouTube). I've played with multiple trigger configurations and I'm at my wits end.
- Jürgen_Schoene_Community Member
trigger are not supported for "Video from Website..."
you have to do by hand, with webobject and the corresponding video-api of the video provider- RobertGiebitzCommunity Member
Thanks for the reply, Jürgen, but you’re speaking beyond my skill level. I am a beginner. Are there specific steps I can follow, on a level of one-two-three, to get Storyline to advance to the next slide?
Rob
Robert P. Giebitz, PhD
Learning & Development Consultant, Office for Continuous Professional Learning, School of Medicine
Statistical Literacy Instructor, Department of Mathematics and Statistics
University of New Mexico
Albuquerque, NM 87131-0001
505-850-5815
盖澎博 - SamanthaBergCommunity Member
Thanks for the reply, can you please explain 'you have to do by hand'? Where does the video API get put into Storyline?
- MathNotermans-9Community Member
You have to use Javascript to call the WebObject and set a variable to progress to the next slide. Without some basic knowledge of Javascript, HTML5 and how to use it in Storyline...it will be tough to get working...
- SamanthaBergCommunity Member
Thanks for reply, I fully understand that you have to use JavaScript to call the WebObject and set a variable. I am asking for some help on how this is done. An expert in anything was once a beginner.
- SteveGannonCommunity Member
Samantha,
If you carefully review this blog article and study the sample file provided, you can learn how to control YouTube videos via JavaScript from within Storyline:
https://www.rabbitoreg.com/2016/01/09/full-control-over-youtube-video-in-storyline/
In particular, near the end of the article (and in the code) you will see how the author used a custom variable called "End" to trigger a layer when the video ends. In your case, you could use this same variable with a trigger to activate your Next button.
- SamanthaBergCommunity Member
Hi Steve thanks for your reply, I have looked over that post. I am unable to download the source file provided.
- SteveGannonCommunity Member
It's a zip file. Here's the link:
http://rabbitoreg.com/yutube/youtube_example.zip
Unless your browser security blocks zip downloads, you should be able to access it. It may go directly to your Downloads folder.
- SamanthaBergCommunity Member
Thanks so much! My organization was preventing me from downloading it securely.