Embedded Video Trigger
Apr 29, 2015
By
Chris Zarras
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:
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.
Wondered if anyone had a suggestion on how to force completion of an embedded video before a user can proceed?
Thanks
9 Replies
This only works with videos that have been imported in Storyline. With an embedded video, Storyline 'has no way of knowing' when the hosted video completes.
Figured as much. Worth a try asking.
Thanks Michael
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:
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!
Thanks for sharing Toby!
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!!
Hey Bridgitte! This thread is a bit dated and I'm not sure that Toby is still subscribed here. You are certainly welcome to reach out to the user directly via the 'Contact Me' option on the user profile if you do not hear back soon.
Thanks for the suggestion :) I will definitely do that as well! Thank you!
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?
Hi Susan,
If you're willing to share a copy of your project file here, myself or one of our talented community members might have some suggestions for you try to make the trigger work. You can also open a support case if you're more comfortable sharing your project file in private.