Divi background video not playing on iPhone
If you have put a video in the background of a Divi section and it stays frozen on iPhone, this fix does the job. It comes from a Reddit thread, I tested it and it works.
The case
I had a Divi section with a background video, and inside it a slider with several slides. On a Pixel 6, a Xiaomi 11 Lite and desktop browsers (Edge, Firefox, Chrome), the video started normally. On iPhone it did not: first frame, then nothing.
The behaviour comes from Safari’s autoplay policy on iOS. A background video must be muted to start on its own, and Divi does not always set the attribute at the right moment, especially when the section contains a slider.
The fix
Paste this in the child theme functions.php, or in a custom code plugin:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery(".et_pb_section_video_bg video").prop('muted', true);
});
</script>
The line forces the muted attribute on every section background video once the page is loaded. Safari then accepts autoplay, and the video starts.
Script source: Reddit, r/divi.
What to know
The selector .et_pb_section_video_bg video targets section background videos only. It does not touch a Video module or a slider video. If your video sits in a module, adapt the selector.
The script assumes jQuery is loaded, which is the Divi default. If you removed it for performance reasons, use DOMContentLoaded in plain JavaScript instead.
Finally, this fix dates from 2022. Divi has changed since, and recent versions usually set muted themselves. Check whether the bug still exists before adding code.