Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Autoplay with HTML 5

Community Beginner ,
Jul 25, 2012 Jul 25, 2012

Hi How can you put AutoPlay on HTML5? I still have to click on an arrow, so that the content starts.  With Flash was not a problem ...  Regards Chris

TOPICS
Advanced , Editing
19.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 15, 2015 Jan 15, 2015

Could you please add a screenshot of the location of cp.movie.play()

I tried adding it as you mentioned but the movie doesn't load anymore it just sits there with the loader spinning.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 15, 2015 Jan 15, 2015

adobe-captivate-html5-index-code.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 15, 2015 Jan 15, 2015

Thanks a Million

Works like a charm

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 21, 2015 Oct 21, 2015

The good news is that this works. The not-so-good news is that it blows by the invisible checkbox I inserted with the "Pause project until user clicks" option, meant as a way of stopping the timeline. I had the checkbox enter after 1 second, to eliminate conflict with the code, but the slides advance, anyway.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 06, 2016 Apr 06, 2016

I know this thread is getting old but I'm hoping someone still gets messages from it...

I got the CP movie to play automatically on mobile but I'm not getting audio with it. Any suggestion to get the audio to play? When I had to tap the play button to run the CP on mobile, I got everything but now that it plays automatically, there's no audio. Thanks for any help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 11, 2016 Apr 11, 2016

Same here. Removing the play button using the method above breaks any video functionality in my particular project. There has to be a better way.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 04, 2016 Jul 04, 2016

@ - Wonderful! Thank you so much!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 10, 2022 Nov 10, 2022
LATEST

Hi, 

the cp.movie.play() is working fine, but unfortunately it does not handle the re-open of a course. 
The LMS is sending the data that a user can enter directly the last slide. 

But when I add the cp.movie.play() in the cpInit(); it is not using the last progress.

Any ideas?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 05, 2015 Feb 05, 2015

Thanks Kurrykid‌ for the detailed workaround. I have Captivate 8 and am having this problem as well, but I think my LMS (Docebo), being over-zealous about security, strips out the window.cp script object. So I can't just use cp.movie.play();

I'm hoping there's a way I can use HTML5 so that I can avoid Flash for mobile devices, but I'm finding that in Chrome, HTML5 can't be made to autoplay, in Firefox, it throws up the Unsupported Browser box (disabled this with $("#CPUnSupportedBrowserWarning_ID").remove();)

I don't mind editing code a little, but I need some kind of workaround: my users aren't going to know what to do. I was originally hoping to have my own simplified buttons on each slide but I don't see a good practical way around the default playbar.

Can anyone from Adobe chime in on this issue? I would like to see if I can verify that the LMS is stripping out Javascript in the SCORM file. Thanks so much for any help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 06, 2015 Feb 06, 2015

Put an alert('hi'); into the javascript, you will see if the javascript is being run or not then

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 06, 2015 Feb 06, 2015

Hi windscorpion‌ thanks so much for responding - Javascript is working, it's the window.cp object that is getting stripped out. Sorry, I shouldn't have made it sound as if ALL js was getting removed. ScormCloud LMS lets me interact with window.cp, but not Docebo.


Does anyone know an alternate way of getting that movie to play without access to the cp object? Thanks again

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 11, 2016 Apr 11, 2016

All you have to do is open the index page in a text editor and add this little code snippet:

cp.movie.play();

}

below this:

cpInit();

It will work on all IOS devices.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 28, 2016 Jul 28, 2016

On CP 9 HTML5 published, Changing:

cpInit();

  initialized = true;

}

To:

cpInit();

  cp.movie.play();

}

Works but there is no audio.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 31, 2016 Jul 31, 2016

Thanks.

I am using Captivate6 & my project also includes audio as well. So can anyone please help me with this scorm bookmarking issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 28, 2016 Jul 28, 2016

Hi, i have try this code:

If you want autoplay with HTML5, edit index.html and find function DoCPInit(). After CPPostInit(), add the lines

CPPlayButtonHandle("onkeydown");

cp.movie.play();

its working fine. But now i am facing issue with SCORM bookmarking. When i am re-login the LMS, i am not able to view last visited slide where i left course last time.

Please help me on this issue.

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 28, 2016 Sep 28, 2016

Autoplay in HTML5 was resolved with Captivate 9, I believe. Until then, the solution I provided above was working OK for us. I think Docebo was being overzealous about security during one of its releases but it also seems to be OK at this point.

As far as bookmarking is concerned, I haven't had any trouble with that in SCORM. My LMS has finally started supporting Tin Can (xAPI) and bookmarking doesn't seem to work in THAT.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 29, 2017 Nov 29, 2017

This thread is 5 years old and the issue is still here (v11.1.0).

And today the fix in this thread is not working anymore because all the JS files are now minified.

I understand that it was like that because of a 'restriction' on iOS that implied the user to explicity do an action for the sound to play. But today it doesn't seem to be the case anymore.

Does anyone know how to fix it now?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 10, 2018 Jan 10, 2018

Play button worked for our company so far. But this problem is moving to desktop and Captivate is not ready for this.

Read these:

Auto-Play Policy Changes for macOS | WebKit

Work arounds for the Safari 11 no-automatic play problem?

Workaround for Safari 11 Update

And Chrome did or is doing the same.

Autoplay Policy Changes  |  Web  |  Google Developers

chrome://flags/#autoplay-policy

chrome://media-engagement/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources