Enable Autoplay Videos In Chrome Safari & Firefox on Macs

The solution in this download folder for members enables you to autoplay videos in WordPress in different browsers on Macs. Tested using a iMac and MacBook Air, this code solves the problem caused by different browsers and operating systems which try and prevent video ads with audio autoplaying annoying users.

This code works with the WordPress video shortcode only. If you’re using the video tag directly in your HTML, you can use any of these solutions which don’t use the video shortcode function for WordPress.

Demo Video

Shows a MP4 video added via the customizer autoplaying behind the front page 1 widget area in Infinity Pro and tested using Chrome, Firefox and Safari browsers.

Tested using iMac and MacBook Air using Safari, Chrome and Firefox browsers with this code for the Infinity Pro child theme for Genesis by StudioPress.

Installation

There’s only 1 step.

Copy & paste the PHP code ( without the opening PHP tag ) to the end of your child themes functions.php file.

Note : Make sure you clear all types of server/plugin/browser caching after code installation.

Download Folder

The code also mutes the video. If you don’t want it muted, remove that attribute from the PHP code.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.