Adobe strikes again. In the latest version of captivate when you publish it makes the user click a button to play the file even if you have selected Autoplay. They are blaming it on modern browsers. I want my html5 products to autoplay. I have a bunch of small lessons so everytime one loads the user will have to click this button. Does anyone know how to edit the published files to remove this?
Regarding applying the cp.movie.play(); line – I was able to change it in the ‘template’ file that Captivate copies from to create the index file every time you publish (make a backup copy of it first and rename it to something like indexOld.html, just in case). I’m on PC and for me that is in Program Files>Adobe > Adobe Captivate 2019 x64> HTML > index.html. That way you don’t have to change the index.html file every time you publish.However, adding cp.movie.play(); regardless of whether it’s not changed in the template and I apply it every time I publish, or if it’s changed in the template, for me results in autoplaying through/skipping the white screen, but it throws up a blank pop up box in both Chrome and IE. You can just close the box, but that’s less than ideal. The poster image solution Lieve talks about is better for me https://elearning.adobe.com/2018/03/get-rid-white-start-screen-black-button-html-output/
Both of the fixes worked for me, but I’m developing a lot of modules. Applying these fixes post-publish introduces a lot of risk and extra work over time. Does anyone think there’s a way for me to make an adjustment in Captivate (or my Program Files) to publish with this code in the output already (rather than applying every single time I publish)?
After publishing, look for file named index_scorm.html and in “function initializeCP” function there will be cpInit();, add an additional function to be something like these:
cp.DoCPInit();
var lCpExit = window[“DoCPExit”];
window[“DoCPExit”] = function()
{
if(cp.UnloadActivties)
cp.UnloadActivties();
lCpExit();
};
if( window.CPYTAPINeeded )
{
var tag = document.createElement(‘script’);
tag.src = “https://www.youtube.com/iframe_api”;
document.getElementsByTagName(‘head’)[0].appendChild(tag);
}
}
cpInit();
cp.movie.play(); (add this line)
initialized = true;
if(isLivePreview() === true)
{
cp.previewFolder = window.location.href.split(“\/”)[4];
setInterval(isLivePreviewDirty, 1000);
}
}
Save and upload (or compress and upload).
Easy way to circumvent Adobe mess up
Note that while the course in fact starts to play fine with the hack mentioned above, if you happen to have a video somwhere in the course on some later slide, Chrome will pause at the beginning of that video, no matter what, and the learner will have to manually start that video then.
Thanks alexllanes !
It worked for me. Finally the client is so happy with this auto load feature.
Keep sharing this type of tips and tricks.
Thanks so much, alexllanes ! Wasn’t looking forward to comparing the files to see what they changed! I already have to modify CMP file for some clients so this isn’t even an extra step; just add these lines to my cpm mod script.
I found were they made the change. Its in the assests>js>CPM.js file
Look for the following code:
a.passwordAccepted && !a.completed && (a.completed = !0, a.responsive && a.adjustResponsiveItems(a.ReasonForDrawing.kRegularDraw), a.fireModuleReadyEvent(a.currentWindow), a.autoPlayNeedsUserClick() ||
a.D.project_main.autoplay && (a.currentWindow.cpAPIInterface && a.currentWindow.cpAPIInterface.canPlay()) && a.movie.play())
Replace with
a.passwordAccepted && !a.completed && (a.completed = !0, a.responsive && a.adjustResponsiveItems(a.ReasonForDrawing.kRegularDraw), a.fireModuleReadyEvent(a.currentWindow), a.device == a.DESKTOP && a.D.project_main.autoplay && (a.currentWindow.cpAPIInterface &&
a.currentWindow.cpAPIInterface.canPlay()) && a.movie.play())
It works for me
For us, the missing autoplay also is a great problem. We implement HTML5-exports of captivate in an LMS, but we do not use scorm, we just implement the html5. we usually build small modules. Now the user has to select EVERY module in the LMS followed by another stupid click. Some time ago there were “hacks” to remove this page and the click … anyone experience with that? How can the click be removed from the exported file? I will even pay for a solution! the objective is: Get rid of the click (a poster image does not help, becaus I still oblige the user to click). Please help.
You can’t have AutoPlay enabled for HTML output anymore due to decisions like by Apple and Chrome. You can only make the experience bit better by using the workflows I described here: https://elearning.adobe.com/2018/03/get-rid-white-start-screen-black-button-html-output/
Hi Teresa,
We have published a blog on this,
https://elearning.adobe.com/2018/05/captivate-responsive-courses-will-not-auto-play-browsers/
Thanks,
Saurav
Sorry I did not see you answer, however you are missing my point. I do not have audio or anything else that is autoplaying. It is a menu, so every time user gets to menu they have to click to continue. Then click a menu item. Also, if the browser wants to block it so be it, why is Adobe making an assumption about every project to disallow Autoplay.
Already answered your question on the forums. You know that the reason is due to some devices not allowing AutoPlay (and not Audio playing automatically neither). It is not totally fair to blame Captivate for decisions by other companies. I will always add a poster image and replace the play button to fit in with the course. Sometimes I am very annoyed on websites where a video or audio start playing without my control but that is of course a personal opinion.
Does anyone else see this Autoplay issue as a problem. I built a menu in captivate, that launches lessons. So now everytime a user goes back to the menu to select another lesson, they have to click a button to play the file first. I do not have audio or animation so there would be no reason why the browser would force it to autoplay. I am getting more and more frustrated with captivate as an elearning tool. I am going back to developing my menu in html and launch captivate built lessons. This is adding so much more time to my development. The lessons still have the annoying Autoplay issue but at least it is not everytime they go to menu. Also this means my menus will not have same interface as lessons because I used HTML scalable feature in captivate. There needs to be some kind of work around for captivate projects that do not have audio and animation, like my menu.
It is not a problem because the whole point here is that the user is in control. There was a (seemingly long) while where the user was not in control of how their computer acted when a user visited a website. Music would start playing in the background without any way to turn it off, webpages would go fullscreen without your permission and lock you out of your own computer. Remember the horrendous pop-ups when the internet first started gaining traction? Where you’d get 30 pop-ups and have to close out your browser? It was all leading up to this finally. An experience where nothing does anything until you tell it to. I don’t want to visit a site and read a blog and a video start playing an ad in my face while I’m trying to read. I know we’re talking about captivate, but as long as the output is to a browser, the user wins. This is the future and it will soon be intuitive. If you want a video to play, you click the play button.
Nathan, totally agree. That was the reason I always turned off AutoPlay for CP-published interactive movies on my blogsite. I have the invasion of audio and video when visiting an ‘agressive( website myself. The fuzz over the AutoPlay is probably more due to the common reaction: I always did it that way, why do I have to change.
You must be logged in to post a comment.