Cheat course autoplay blocker
Hi there,
Thought I post some findings here regarding the infamous new autoplay block for HTML5, introduced in the latest Captivate patch. I found that if I insert a play command in the cpInit() function in the head of the index file like shown below, the course starts playing right away, without the need of clicking the ugly Play button (in fact without it appearing discernibly at all).
function cpInit()
{
document.body.innerHTML = " ...;
cp.DoCPInit();
window.cpAPIInterface.play();
var lCpExit = window["DoCPExit"];
window["DoCPExit"] = function()
{
if(cp.UnloadActivties)
cp.UnloadActivties();
lCpExit();
};
}
Works decently enough for a non-responsive project on latest IE and FireFox versions under Windows (didn't test responsive / mobile).
Catch is, Chrome seems to struggles with it. Although the course autoplays just fine on Chrome as well, once it reaches an video somewhere within the course, it pauses there, regardless if the video object is set to Autoplay or not (in the case of event video).
Anybody knows of some JavaScript code to be fired on slide enter on the video slide, that would force the video to start?
I don't know much JavaScript, so this is all rather empiric trial and error stuff for me. Tried 'document.getElementsByTagName("video")[0].play();' on event video, but couldn't get it to work on slide enter.
