Disabling loop in background video not working

Hi there,

I’m using the suggested solution from https://theme.co/apex/forum/t/background-video-not-playing-in-chrome-and-disable-loop/6049 which adds a function to the custom JS through setTimeout. I have added said function, but the video still loops on my site. Is there anything I might be missing?
Please let me know if you need any additional information.

Thanks,
Thomas

Hi There,

Thanks for writing in!

To help you on your issue, please send us your Website URL and login details in a secure note so that we can have a closer look and give you a possible solution.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Hi there,

Here is the code you need to use for your case:

jQuery(document).ready(function($){	
	setTimeout(function(){
		jQuery('video.x-mejs.has-stack-styles').on('ended', function() {
			jQuery(this)[0].pause();
		});
	},5000);
});

I added the code to Pro > Launch > Theme Options > JS. Thank you.