Forum Discussion

SamanthaBerg's avatar
SamanthaBerg
Community Member
3 years ago

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.

  • RobertGiebitz's avatar
    RobertGiebitz
    Community 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.

  • 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

    • RobertGiebitz's avatar
      RobertGiebitz
      Community 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
      盖澎博

    • SamanthaBerg's avatar
      SamanthaBerg
      Community Member

      Thanks for the reply, can you please explain 'you have to do by hand'?  Where does the video API get put into Storyline?

  • 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... 

    • SamanthaBerg's avatar
      SamanthaBerg
      Community 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.  

      • SteveGannon's avatar
        SteveGannon
        Community 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.

  • SamanthaBerg's avatar
    SamanthaBerg
    Community Member

    Hi Steve thanks for your reply, I have looked over that post.  I am unable to download the source file provided.