Embedded Video Trigger

Apr 29, 2015

Hi There,

I am working on a project in which we are embedding a video from our video hosting site.    I want to force the user to watch the entire video before they are able to proceed, and have followed this guidance to do so:

http://www.articulate.com/support/storyline/how-to-disable-the-next-button-until-users-finish-interacting-with-a-slide

However, I am unable to assign the embedded video as the media item, as it doesn't show up in the Object list when I select Media Completes.

Trigger Wizard

Wondered if anyone had a suggestion on how to force completion of an embedded video before a user can proceed?

Thanks

9 Replies
Toby Alfaro

Hi Michael,

I just had this same question and found this page.  I ended up figuring this out by doing the following:

In StoryLine:

1. Remove Next button from the slide 

2. Create a Text variable with any name.  e.g. VideoFinishedEvent

3. Create a trigger to advance to next slide when the variable changes:

In your video player:

In the equivalent of the video completion event for you video player, add the following JavaScript:

var d = new Date(); 
var player = parent.parent.GetPlayer(); player.SetVar('VideoFinishedEvent', d.getTime());

Here's what's going on;

Line 1:  Creating a date object for use on Line 3

Line 2:  Getting a reference to the StoryLine html player

Line 3:  Changing the variable VideoFinishedEvent to the current time in milliseconds

I'm setting the variable to a value that should always be different from any previous value saved.  This is done to ensure the value is always different, thus triggering the variable change trigger.

I'm sure there is a better way to do Line 2, but I haven't gotten that far yet.

Good luck!

Bridgitte Li

Hi Toby,

Thanks for your guidance! Your solution is really neat and it's given me some ideas as to how to control video playback for our module.

I'm wondering if there's a way to manipulate the javascript code you provided. Can I set my 'VideoFinishedEvent' variable to FALSE by default, and then have the javascript execute to change the variable to TRUE when the vimeo video timeline reaches the end??  If that's possible, I can then link my next button to appear when the variable equals true!  Any insight or help would be greatly appreciated! 

Thank you!! 

Susan Stephenson

I am trying to have a video start at a certain point in the slide to correspond to an audio. Once the audio is done, the learner can click on the video clip to replay. 

For example, I want the video to begin playing at 21 seconds. It plays if I have the video at the start but it won't play if it is placed later on the timeline.  I have tried to create a trigger with no luck.

Can this even be done?