In this tutorial , I would be covering the following points:
I will explain, how to remove video controller from video? and How to make video autoplay in divi?
You can change the Divi logo on scroll in these simple steps:
1. In the Divi video module setting panel, add my css class” ganga-video-autoplay”
2.In the Divi Theme Options panel,Go to integration tab and past the below code.
<script> jQuery(document).ready(function() { if (jQuery('.ganga-video-autoplay .et_pb_video_box').length !== 0) { jQuery('.ganga-video-autoplay .et_pb_video_box').find('video').prop('muted', true); jQuery(".ganga-video-autoplay .et_pb_video_box").find('video').attr('loop', 'loop'); jQuery(".ganga-video-autoplay .et_pb_video_box").find('video').attr('playsInline', ''); jQuery(".ganga-video-autoplay .et_pb_video_box").each(function() { jQuery(this).find('video').get(0).play(); }); jQuery('.ganga-video-autoplay .et_pb_video_box').find('video').removeAttr('controls'); } }); </script>
Hope you like the tutorial!
Hi Ganga, good tutorial. But the video auto play in mute. How I can modify this code to fix this? Thanks!
I am making another tutorial on this
Have you released it?
not now
jQuery(document).ready(function() {
if (jQuery(‘.ganga-video-autoplay .et_pb_video_box’).length !== 0) {
jQuery(‘.ganga-video-autoplay .et_pb_video_box’).find(‘video’).prop(‘muted’, false);
jQuery(“.ganga-video-autoplay .et_pb_video_box”).find(‘video’).attr(‘loop’, ‘loop’);
jQuery(“.ganga-video-autoplay .et_pb_video_box”).find(‘video’).attr(‘playsInline’, ”);
jQuery(“.ganga-video-autoplay .et_pb_video_box”).each(function() {
jQuery(this).find(‘video’).get(0).play();
});
jQuery(‘.ganga-video-autoplay .et_pb_video_box’).find(‘video’).removeAttr(‘controls’);
}
});
This worked for me. Autoplay video and audio on.
Ganga is not needed another tutorial just change the code to have both options.
worked great but lost my volume, can you help?
yes this code will disable the audio
How to I make the audio optional?
i am working on that
Thank you for this tutorial.
The only problem is, that a smartphone in low-battery-mode (or battery-save-mode) will not show autoplay videos. Any trick for that?
I found this solution: https://shaktisinghcheema.com/how-to-autoplay-video-on-mobile-devices-on-low-power-mode/
but the different codes are not working together.
Any idea?
Greets from germany
Is there a way of adding the code to work for mobile devices? It seems to work on desktop but when I open my website on my iOS device , it does not auto plays and no sound .
Hi Ganga, can you tell me how I can add a script like this for ‘Elevated Lite’ theme for WordPress?
Thanks a lot for your help
Hi Ganga, how do I make the loop time longer, like loop every 5s?