Javascript to change variable

Hi all,

I need to use javascript to change the value of a variable when an embedded video completes. The video is coming from Wistia. A couple of years ago, I was able to do able to do this but now the same code doesn't work. Here's the code. I have tried two variations but all are non-starters. Can any one help me with this?

  • removed this line <script type="text/javascript">
  • removed parent in this line var player = parent.GetPlayer();


<script type="text/javascript">
wistiaEmbeds.onFind(function(video) {
video.bind("end", function() {
var player = parent.GetPlayer();
player.SetVar("EndofVideo3","on");
return this.unbind;
});
});
</script>

Cheers,

Julie

2 Replies
Julie Stelter

Thank you Brian for the response. The problem was actually in teh embed code from Wistia. I needed to remove the async command. When I did that everything worked. I have been told by other Javascript developers that the code used in articulate is not typically the way it is done. 

Thank you Brian!

Cheers,

Julie