Divi: How to fix video as a background that won’t play automatically on iPhones?

Mohamed El Koudesi

24/12/2022

If you, like me, have experienced issues with using a video as the background for a Divi section on an iPhone, this fix may be able to help

In the context of this issue, I attempted to use a video as the background for a Divi section that contained a slider with multiple slides. The video played correctly on devices like my Pixel 6, my wife’s Xiaomi 11 Lite, and on desktop browsers such as Microsoft Edge, Firefox, and Google Chrome. However, on an iPhone, the video was not playing automatically.

To fix the issue, I used the script below and it fixed the problem:

<script type="text/javascript">
jQuery(document).ready(function(){jQuery(".et\_pb\_section\_video\_bg video").prop('muted', true);});
</script>

Script source: Reddit

Divi WordPress Theme
Divi WordPress Theme