If you are using Divi WordPress Theme from ElegantThemes, you probably already know that it supports video background in the built-in slider module.
The only issue with the background video in slider module of Divi theme is that it loops by default. This means that it starts to play again once its finished. If you want to disable the looping the video, then there is no option to do it in Divi theme.
The option to disable video looping is not available in Divi probably because the purpose of background video is to play endlessly. Its not a good for user experience to stop the video after playing once as there won’t be any way to play it again once its stopped.
But if you want to disable the video loop in Divi theme for some reason, then it can be done by editing a theme file. Open includes/builder/main-modules.php file and find this line of code,
Replace it with this line,
Then clear your browser’s cache and check. The video will stop, after playing once.
Note that you need to remove the loop attribute completely because in HTML 5 video tag, the loop attribute is a boolean attribute. This means that if its present in the video tag, it will be automatically considered as true, regardless of its actual value. So, even if you set
loop="false", it will still be considered as true.