Autoplay Video Player

Hi, I’m experiencing what looks like a bug. I’m using the Video V2 element. I uploaded an MP4 and set it to autoplay. When I’m in Cornerstone, the video autoplays. However when I save and go to the live page, the video doesn’t auto play.

Hello @Tiff,

Thanks for asking. :slight_smile:

I just tested V2 element video player autoplay function and on my dev setup it’s working fine. On your website I see you have activated Cloudflare. Can you please clear Cloudflare cache and make sure to disable minification feature?
Along with that please try to increase PHP memory limit and see how it goes. You can do this by editing your wp-config.php file which can be located under the root of your WordPress installation.

Add the following lines into that file.

define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

Thanks.

Thanks, I increased memory limit (even though the video is 717kb), I checked and did not have minification on in cloudflare. I disabled all other plugins. I double checked my settings. I tested it in two different browsers (Chrome & Safari on Mac). Still the same thing… it autoplays while I’m editing it in cornerstone, but on the live page it just doesn’t auto play.

I fiddled around with it and got it to work. I also narrowed it down to one specific toggle that is causing the problem:

When I have the video muted, the video will auto play.
When I unmute the video, the video will not auto play.

Can you test that to see if you can replicate that? I have no other plugins active and finally got it working.

Hey @Tiff,

The video autoplays in my test site whether muted or unmuted. I see an error in the console jQuery is not defined. Looks like this comes from your optimization. Please clear all caches and deactivate your caching/optimization plugin (Breeze). Please note that minifying resources might break or change the behavior of script dependent functions in your site.

Thanks.

1 Like

I added the optimization after I got the video to work.

Thanks for your help! I appreciate your quick responses :slight_smile:

You’re most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.