Poster Image - AutoPlay

For CP2019 users:  the last hack to get rid of the rectangle surrounding the play icon is no longer necessary. It is removed in this version.

Intro

This short blog post is meant to help solving an issue that pops up in the forums once in a while: "How to get rid of the white screen and Play button on mobile devices?". When publishing to HTML the AutoPlay is automatically disabled,  Reason is that some devices and OS (iOS) do not allow Autoplay. For SWF output you had the choice: it was possible to change the default setting which was to have a movie playing automatically after loading. I often disabled that option when embedding SWF's on my blog (look at older articles), especially when audio was involved because it is not very polite to have audio being pushed to the reader automatically. 

Consequence of the AutoPlay being disabled without your control as developer, is the appearance of a big white screen with a small play button right in the middle. The button looks like this (but originally one is smaller, 96x96), black arrow in black circle with transparent background:

Such a button will not always blend well in the design of your project.

Poster image

To get rid of the white screen, you need to create a "poster image"? That is a static image, preferably with the same resolution as your project. For a non-responsive project, published with Rescalable turned on, the poster image will fill up the screen. All embedded HTML movies in my blog were using this type. 

Mostly I duplicate a slide from the project to create such a poster image, Duplicate because it may need some editing, especially if you also want to have a better looking Play arrow. I will take a screenshot of that slide while it is playing to save as a PNG (or other image format) and then hide the slide to avoid it to be included in output. 

When the image is ready, set up the Preferences, Project, Start and End: turn off AutoPlay and indicate the poster image.

Play Arrow

My personal hack to have a play arrow that is fitting with the design of each project is this workflow:

  • I created a copy of the original image  C:\Program Files\Adobe\Adobe Captivate 2017 x64\HTML\assets\htmlimages\PlayI_icon.png and edited to turn it into a full transparent image 
  • I renamed the original image and put the empty image in the same path.
  • On the poster image I created an arrow, mostly I use a triangular shape, rotated 90°, using colors from the project Theme Colors palette. You will have seen them in previous blog posts.
  • That Arrow has to be centered horizontally and vertically. 

Dimmed or not Dimmed?

The uploaded published HTML project will by default have a dimmed Poster image (Alpha = 70%). It was meant to have the original Play icon stand out from the background. But that black play icon is gone:

A helpful user on the forum posted the solution: Mark Sabrento  Thanks a lot, Mark (screenname sabre123). I tried it out and it works great. You find it in this  thread

Look for the file CPM.js, which you'll find in the published folder under \assets\js

Open his file in an editor (I use Brackets, but even simple Notepad is possible). Change 0.7 to 1 in this line to set the opacity(alpha)  to 100%

cp.autoplayImage.style.opacity=0.7

Update

An expert posted a solution  in a thread to get rid of the focus rectangle surrounding the play icon. Sorry, but I forgot to bookmark the thread, which means I cannot pay credit to that expert by name, but found it worthwhile to complete this blog post with that solution:
  • Find the file CPLibraryAll.css in the published folder under assetscss.
  • Add these lines before the existing script:
       *:focus {
       outline: 0;
       }
In that same file you could also change the width and height of the original Play icon which is set at 116x116px.