Forum Discussion
Trigger on Vimeo/online video completion.
Hello Fred,
Vimeo has a javascript api.
Using this api, code can be written that can update storyline variables. When the storyline variable is updated to 'Ended', you can have a trigger change your custom next button from hidden to normal.
Here is a link to a published storyline project:
http://www.knowledgeconstruction.com/vimeo/story.html
I have also attached the storyline project and a webobject.
The webobject has an index.html within it. It has the code to show a vimeo video and the code that updates the storyline variables. You can easily edit this code by opening the file in notepad.
Russell,
When I run your SL file neither the video status or the video time fields update. They remain blank. I have made sure that the web object is pointed to the folder with the index.html file and I am publishing to the web. The video will load and I can play it, just nothing populates either of the two fields.
Any thoughts on this?
- RussellKillips-10 months agoCommunity Member
Hi Joe,
I don't know why it's not working for you.
I just published it to Review 360 and its working there.
https://360.articulate.com/review/content/83654b05-8016-4164-8b5e-af351cbec01c/review
- RussellKillips-10 months agoCommunity Member
Make sure that you are viewing it from an online source.
- JoeFrascella-8510 months agoCommunity Member
Ah, the missing piece of the puzzle. Thanks for the reply.
I'm attempting, in my old age, to learn some relevant JavaScript that can be used in SL, so please excuse me for asking something that is probably very basic. I have figured out how to get the "Videotime2" variable to populate as a percentage ( SLplayer.SetVar("Videotime2", data.percent); ) but I have been unable to figure out how to multiply that output by 100 so that it reads 0 - 100 and not .0 - 1.
We don't want the person taking the course to be able to scrub through the video until it has played once. I was thinking that I would have to create a 2nd slide with a web object pointing to a second version of the video where the scrub bar is available and having the course move to that second slide after the first plays through. I did not see any indication, in the Vimeo SDK documentation, that you could turn the scrub bar on/off with JavaScript.
We want to pull from Vimeo as video content is starting to occupy too much of our available space on our LMS.
Again, thank you for your assistance and insight.
- RussellKillips-10 months agoCommunity Member
For the percent range use:
SLplayer.SetVar("Videotime2", data.percent*100);