Jump to content

Video not looping

Go to solution Solved by dotandpeg,

Recommended Posts

  • Replies 2
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

That's really strange, with uploaded videos I've never had a problem with a loop not working. What settings have you used?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Hi @Ziggy,

I've found the issue as I realised none of my videos are looping. I added the below code to my sites' footer injection as I only wanted the homepage video on desktop and mobile to loop once but it was affecting everything.

I have moved the code to my homepage advanced settings and this has fixed the issue.

Thanks

<!-- LOOP VIDEO ONCE HOMEPAGE-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function($){    
  setTimeout( function() {
         $('video').removeAttr('loop');
    }, 5000);
  
  
});
</script>
<!-- LOOP VIDEO ONCE HOMEPAGE-->

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.