How to Embed a YouTube or Vimeo Video that autoplays and loops on SquarespaceTutorialsSquarespace 7.1Squarespace 7.0 Aug 30 **See updated blog on video autoplays and loops**In this tutorial, I will show you how to Embed a YouTube or Vimeo Video that autoplays and loops on Squarespace site. This code works for both Squarespace 7.0 and 7.1 Show
We recently did a project for a client and one of the main requirement was that the video autoplay was muted and loop. There are many reasons why you may want to do this.
We tried both Youtube and Vimeo and while the both worked, Youtube had an issue of not be responsive in term of height as compared to Vimeo. Below are the code for embedding autoplay and loop videos from both Youtube and Vimeo For Vimeo; You can use the code below <div style="padding:56.25% 0 0 0;position:relative;">
<iframe src="https://player.vimeo.com/video/[value]?autoplay=1&loop=1&title=0&byline=0&portrait=0&autopause=0&muted=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> This is a sample video URL https://vimeo.com/448265508 used, so you replace [value] with 448265508, see below <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/448265508?autoplay=1&loop=1&title=0&byline=0&portrait=0&autopause=0&muted=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
To embed the code you will need a Embed block for this. For Youtube <iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/[value]?playlist=[value]&autoplay=1&controls=1&loop=1&mute=1" frameborder="0" allowfullscreen></iframe> Simply replace [value] with the real value of v, which in this case is lIczcIdgMUo as shown below: <iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/lIczcIdgMUo?playlist=lIczcIdgMUo&autoplay=1&controls=1&loop=1&mute=1" frameborder="0" allowfullscreen></iframe> To embed the code you will need a Embed block for this. Home Blog Primitus Consultancy We work with small and medium-sized businesses to help create a professional online presence. I provide a one shop full-service design studio in London, United Kingdom. How to Embed a YouTube or Vimeo Video that autoplays and loops on SquarespaceTutorialsSquarespace 7.1Squarespace 7.0 Aug 30 **See updated blog on video autoplays and loops**In this tutorial, I will show you how to Embed a YouTube or Vimeo Video that autoplays and loops on Squarespace site. This code works for both Squarespace 7.0 and 7.1
We recently did a project for a client and one of the main requirement was that the video autoplay was muted and loop. There are many reasons why you may want to do this.
We tried both Youtube and Vimeo and while the both worked, Youtube had an issue of not be responsive in term of height as compared to Vimeo. Below are the code for embedding autoplay and loop videos from both Youtube and Vimeo For Vimeo; You can use the code below <div style="padding:56.25% 0 0 0;position:relative;">
<iframe src="https://player.vimeo.com/video/[value]?autoplay=1&loop=1&title=0&byline=0&portrait=0&autopause=0&muted=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> This is a sample video URL https://vimeo.com/448265508 used, so you replace [value] with 448265508, see below <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/448265508?autoplay=1&loop=1&title=0&byline=0&portrait=0&autopause=0&muted=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
To embed the code you will need a Embed block for this. For Youtube <iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/[value]?playlist=[value]&autoplay=1&controls=1&loop=1&mute=1" frameborder="0" allowfullscreen></iframe> Simply replace [value] with the real value of v, which in this case is lIczcIdgMUo as shown below: <iframe width="100%" height="315" src="https://www.youtube-nocookie.com/embed/lIczcIdgMUo?playlist=lIczcIdgMUo&autoplay=1&controls=1&loop=1&mute=1" frameborder="0" allowfullscreen></iframe> To embed the code you will need a Embed block for this. Home Blog Primitus Consultancy We work with small and medium-sized businesses to help create a professional online presence. I provide a one shop full-service design studio in London, United Kingdom. |