Copy link to clipboard
Copied
Cap 9.0.2.421 on Windows
We publish some courses to both SWF and HTML5 and use the multiscreen file. However, some customized content doesn't behave or display properly on the HTML5 side. So:
1. Is there some undocumented Cap variable we can access to determine if the output being used is SWF or HTML?
2. Is there some JS I can use to determine it? I've tried
if(typeof window.cp === 'undefined'){
/* SWF */
window.cpAPIInterface.setVariableValue("varOutputType","SWF");
} else {
/* HTML5 */
window.cpAPIInterface.setVariableValue("varOutputType","HTML5");
}
on the Enter of the first slide. It works for SWF (testing against the project.htm file) but just sits at the Loading screen for HTML5 (testing with the index.html file)
Copy link to clipboard
Copied
Hi Jefferbob,
I don't have an answer to your question but I do have an interest in the underlying function. When you publish multiscreen do you know the order the browser checks? For example Safari will obviously only check for HTML5, but what about Chrome? Does it check for HTML5 first and load if it finds it, or does it check SWF first and loads SWF if it finds it.
I am publishing to an LMS that requires that both versions be produced. I have a widget that only works in HTML5 that I would like to use for this project but can't, until I resolve this issue.
Any experience you would like to share?
Cheers
Steve
Copy link to clipboard
Copied
It checks if it is handheld first. If the navigator.userAgent is:
["blackberry","android","iphone","ipad","symbian","smartphone","ios","windows ce","webos"];
it loads html5, else it loads Flash.
Copy link to clipboard
Copied
Awesome ! Thanks for the speedy response TLC!
Copy link to clipboard
Copied
It works for me both ways. Are you executing this in the JS Window? Try getting rid of the comments and put double quotes around "undefined"
Copy link to clipboard
Copied
Still nope. I've tried with both singles and doubles, and now no comments. It works in both previews within Captivate, and the SWF version works when published, but not the HTML5 one.
Yes - the code is in a script window on the Enter of the first slide.
Copy link to clipboard
Copied
Con you check the console and see if there any errors? Press F12 in the browser.
Copy link to clipboard
Copied
Nothing earlier, but now see that the /dr/imgmd.json file is throwing a 404. The file is present on the server.
Copy link to clipboard
Copied
Ask your web server administrator to ensure the JSON mimetype is allowed. Previous versions of Captivate didn't have JSON files in the output. Cp 9.0.2 does.
Copy link to clipboard
Copied
Not our first HTML5 course in 9.0.2 - other Cap HTML5 courses play fine and do not exhibit a missing file.