How to loop self-hosted videos
To loop self-hosted videos you will need to add the code below in your theme’s functions.php file:
$(document).bind('DOMSubtreeModified', function () {
if($('video').length){
$('video').attr('loop','loop');
if( $("video").prop('muted') ){
$("video").prop('muted', false);
}
}
});
We recommend to use a child theme before making changes to the theme’s files though. You can see here how to create a WordPress child theme: https://www.wpbeginner.com/wp-themes/how-to-create-a-wordpress-child-theme-video/