Hi there I just want to ask you how can I set the repeating of the background video just once. Not to has it as a loop.
Thanks
Michael
Hi there I just want to ask you how can I set the repeating of the background video just once. Not to has it as a loop.
Thanks
Michael
Hi Michael,
Thanks for reaching out.
There is available feature for the loop as of now and the loop option is defined within the javascript. Could you try adding this code to your global custom javascript?
jQuery( function($) {
function no_bg_loop () {
$('.x-bg video').removeAttr('loop');
}
$(document).ready( no_bg_loop );
$(window).load ( no_bg_loop );
no_bg_loop();
} );
And it may not work as Wordpress media player may ignore the changes applied directly to <video> element.
Thanks!
Thank you for your reply but unfortunately it is not working in global custom javascript. On the other hand we are not using video as an element but as a page background type so where can we add this function?
Thanks
Michael
Hey Michael,
You can try this code instead in cornerstone’s JS section so it’s only applied to that page:
jQuery( function($) {
function no_bg_loop () {
$('video').prop('loop', false);
}
$(document).ready( no_bg_loop );
$(window).load ( no_bg_loop );
no_bg_loop();
} );

As mentioned above, it may not work as WordPress media player may ignore the changes applied directly to video tag, if it doesn’t work then you can use Revolution Slider’s video layer instead. That way you can disable the video loop. Please see https://www.themepunch.com/revslider-doc/video-layers/
Thank you for your understanding!
Thanks a lot.
Michael
Glad you’re all sorted! 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.