Different javascript behavior in Chrome, depending on Flash or HTML5 output
Sep 29, 2015
I'm using the following javascript code to set a Storyline variable at the end of a video that is playing inside of a frame. This works great in almost every browser. However, Chrome with HTML5 is NOT setting my variable. I'd rather not remove this option from our compatibility list.
Does js perform differently in Chrome's HTML5 output? I've placed my variable on the slide, and it's value does not change when the end of the video is reached. How can I troubleshoot this from here?
<script src="http://fast.wistia.net/assets/external/E-v1.js"></script>
<iframe src="http://fast.wistia.net/embed/iframe/StringForVideo" allowtransparency="true"
frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen=""
mozallowfullscreen="" webkitallowfullscreen="" oallowfullscreen="" msallowfullscreen=""
width="640" height="360"></iframe>
<script type="text/javascript">
wistiaEmbeds.onFind(function(video) {
video.bind("end", function() {
var player = parent.GetPlayer();
player.SetVar("EndofVideo","on");
return this.unbind;
});
});
</script>
9 Replies
Hi Mike,
JS shouldn't behave differently in the HTML5 output as far as I know - but I'd defer to the community for their JS expertise here. Have you also tried it outside of the frame to see if that's a part of the issue?
I've opened a support ticket for this. Hopefully we won't encounter this scenario as I believe Chrome installs Flash by default in Windows. The HTML5 version in Chrome on the Mac worked fine.
Thanks Mike for letting me know you've reached out to Support as well - if you're able to share the case number here I'm happy to follow along as well. Chrome does have Flash by default, which can be disabled in the browser or you can chose to point directly to the HTML5 output using the story_html5.html link if published for web.
Case # is 00655372. Thanks Ashley!
Thanks Mike - and I shared this thread with our team as well so I'll continue to follow along.
I figured this out and notified support. My bad, I was viewing the content locally, so javascript was not running. I'm accustomed to previewing in Firefox with HTML5, which even though it's not supported, is great because it allows javascript and web objects to load locally, so I don't have to upload my project every time I want to preview it.
Thanks Mike for updating us here and updating our Support team. Always test in the publish environment to ensure things are working as expected. :)
Unfortunately, that can slow things down when wanting to quickly check a change or troubleshoot something. I'm going to investigate the FTP option in SL to see if that will allow me to quickly check my content online.
Certainly understand Mike, hope the FTP option works for you.
This post was removed by the author
This discussion is closed. You can start a new discussion or contact Articulate Support.