change variable when web object video completes

Oct 12, 2015

Has anyone used this method  to successfully trigger a variable when a video ends? I have tried several ways to get this to work and have yet to have any success. It appears the original author is not answering any questions about it. 

If you have a different solution I'm open to any and all suggestions. 

 

7 Replies
Mike B.

I've done this successfully with the Wistia video service, using their javascript API. Which service are you using? Should should be able to accomplish the same with any service that has a similar API.

Here's thread where I posted my solution and code to make it happen: https://community.articulate.com/discussions/articulate-storyline/detecting-end-of-wistia-video-with-javascript

 

Michael Shannon

Thanks Mike for getting back to me. I've been trying to resolve this through vzaar using your technique (the one I posted has other issues that prevent me from using it as a solution anyway. They are stymied because they aren't sure how all of this works since it is buried inside of SL. Simple web page, yes, but SL no. They can't figure out how it all works. I'm posting what I'm using in the embed code for the video below. Maybe someone from the community could direct me to the solution. I know we're close, I just need a nudge. 

<script src="http://player.vzaar.net/libs/flashtakt/client.js" type="text/javascript"></script>

<script type="text/javascript">

window.addEventListener("load", function() {
var vzp = new vzPlayer("vzvd-5408522");
vzp.ready(function() {
vzp.addEventListener("playState", function(state) {
if (state == 'mediaEnded')
{
var player = GetPlayer();
player.SetVar("EndofVideo","on");
}
});
});
});


</script>

<iframe allowfullscreen="" allowtransparency="true" class="vzaar-video-player" frameborder="0" height="324" id="vzvd-5408522" mozallowfullscreen="" name="vzvd-5408522" src="http://view.vzaar.com/5408522/player?apiOn=true" title="vzaar video player" type="text/html" webkitallowfullscreen="" width="576"></iframe>

This discussion is closed. You can start a new discussion or contact Articulate Support.