If you want to auto-play video in Cover Area, and you’re hosting your videos on YouTube, you’ll need to add ?autoplay=1 to your Youtube link.
Your standard YouTube link looks like this:
Once you add the autoplay parameter, the link will look something like this:
You can use the same link inside the iframe. So, if you’re embedding the video inside Classic Editor or an HTML Block, your iframe should look like this:
<iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/piUCZCfLqNg?autoplay=1″ title=”YouTube video player” frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture” allowfullscreen></iframe>
The procedure is pretty much the same if you want to auto-play your Vimeo videos, as well, by adding autoplay parameter to your Vimeo video URL:
Standard Vimeo URL:
And once you add the parameter, your Vimeo link will look like this:
<iframe src=”https://player.vimeo.com/video/253989945?color=ef0800&title=0&byline=0&portrait=0?autoplay=1″ width=”640″ height=”360″ frameborder=”0″ allow=”autoplay; fullscreen; picture-in-picture” allowfullscreen></iframe>
<p><a href=”https://vimeo.com/253989945″>Sample Video</a> from <a href=”https://vimeo.com/testbusiness”>Vimeo Test User Business</a> on <a href=”https://vimeo.com”>Vimeo</a>.</p>
If you’re working with self-hosted videos and want to use the autoplay feature, the best thing to do would be to use the Gutenberg Editor Video block. Once you insert the video inside the block, you can turn the autoplay inside the Video Block settings.
You can also try to force autoplay by navigating to Theme Options > Single Post > Video > Try forcing autoplay and turning that option on.