Jump to content

Video won't autoplay no matter what I do

Recommended Posts

Site URL: http://www.linehouse.london/tsp

Hi everyone,

I've been trying to get two Vimeo videos on a page (www.linehouse.london/tsp) to autoplay on loop, but after trying 5 different things and checking every thread about it here on the forum, I am still unable to make it work. Sometimes it works once, and then 'breaks' (as in, stops autoplaying after I refresh the page). Or it autoplays on my machine but not on others.

I've tried doing it as a video block with embedding code, or simply as a code block - same disappointing results...

Here's the code I've been using:

<iframe src="https://player.vimeo.com/video/497646469?autoplay=1&loop=1&autopause=0&controls=0&title=0&byline=0&playbar=0" width="640" height="373" frameborder="0" allow="autoplay"></iframe>

I'd also love to hide the Vimeo controls, if possible (I don't have a Premium vimeo account so can't change this is vimeo settings).

 

Thanks!

Link to comment
  • Replies 8
  • Views 4k
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
  • 3 months later...

Hi,

Does anyone know how to autoplay a video once in 7.1? My videos autoplay fine, but I'd prefer them to only do it once, regardless of whether a visitor lets it play to the end or not.

I have paid YouTube and Vimeo accounts and Squarespace business plan.  I understand that I can't set loop=0 because that is 'false' so it won't autoplay at all.

I tried this in the page header code using the block yui code for video id, but it didn't work.

<video id=" video id here " autoplay="1" />

Thanks to anyone who can help.

Link to comment
  • 2 months later...

Since April 2018, Google made some changes to the Youtube Autoplay Policy. You not only need to add the autoplay=1 as a query param, but also add allow='autoplay' as an iframe's attribute

So you will have to do something like this:

<iframe src="https://www.youtube.com/embed/VIDEO_ID?autoplay=1" allow='autoplay'></iframe>

 

Link to comment
  • 3 months later...
On 1/13/2021 at 9:20 PM, winterstellar said:

Site URL: http://www.linehouse.london/tsp

Hi everyone,

I've been trying to get two Vimeo videos on a page (www.linehouse.london/tsp) to autoplay on loop, but after trying 5 different things and checking every thread about it here on the forum, I am still unable to make it work. Sometimes it works once, and then 'breaks' (as in, stops autoplaying after I refresh the page). Or it autoplays on my machine but not on others.

I've tried doing it as a video block with embedding code, or simply as a code block - same disappointing results...

Here's the code I've been using:

<iframe src="https://player.vimeo.com/video/497646469?autoplay=1&loop=1&autopause=0&controls=0&title=0&byline=0&playbar=0" width="640" height="373" frameborder="0" allow="autoplay"></iframe>

I'd also love to hide the Vimeo controls, if possible (I don't have a Premium vimeo account so can't change this is vimeo settings).

 

Thanks!

Hi @winterstellar, not sure if you are still looking for an answer but below is detailed answer.  Note: you need to use the Squarespace Image Blocks, not a code bock. See screenshot below.

The best way to do this is to use a squarespace block, Vimeo or Youtube.  

I have used the below code inside Squarespace's video block.  But instead of adding the link, you can click <>  and insert this code below but change out your video ID. 

This makes the videos autoplay and loop.  You can adjust the controls and sound (background), etc too. See below and screenshot attached for reference. 

For an example: I am using it on my SquareKicker website here:  https://squarekicker.com/features

Just swap out the Vimeo / YouTube ID number for yours. 

VIMEO
<iframe src="https://player.vimeo.com/video/625215456?autoplay=1&loop=1&autopause=0&background=1&color=ffffff&controls=0&portrait=0" width="800" height= "500"  frameborder="0" allow="autoplay; fullscreen"  allowfullscreen></iframe>

YOUTUBE
<iframe width="100% !important" src="https://www.youtube.com/embed/oyuCciYX2S4?playlist=oyuCciYX2S4&autoplay=1&mute=1&controls=0&loop=1" frameborder="0" allow="accelerometer; " allowfullscreen></iframe>

Note: Youtube needs a playlist to loop the video, just use the same video ID

1465171763_AutoplayVideoonSQSP.thumb.png.7862dd46de2130be5a6fb61be841d8b9.png

SquareKickerHi, I'm Nick, CEO & Co-Founder at squarekicker.com.  Take your Squarespace sites to the next level with SquareKicker's No-Code Design & Animation Extension. Break free from templates & complex code and start building unique websites that you are proud to show your clients without ever having to write a single line of code. 

Squarespace Extension  ●  Templates  ●  News  ●  Inspiration  ●  Tutorials  ●  Resources

 

Link to comment
  • 1 year later...

Hi friends!
Looks like an old thread but issues with video autoplay on Squarespace are persistent. IMHO it should just work as other options do like Boldgrid for example https://raggededge.com/work/marshmallow/ don't have a problem managing it well.

My context is how to embed video from Vimeo on a Gallery page and have it autoplay.
It embeds fine, but won't autoplay, even though the Vimeo embed code specifies it should. Also Squarespace alters the Vimeo embed code after saving it. Why? I have no idea.
Here's the gallery example https://www.scottandreae.com/five

Here's the Vimeo embed code:
<iframe src="https://player.vimeo.com/video/115219608?h=008e4564e9&autoplay=1&loop=1&color=ffffff&title=0&byline=0&portrait=0" width="1500" height="1500" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>

Here's what it looks like after one saves it on Squarespace:
<iframe allow="autoplay; fullscreen; picture-in-picture" allowfullscreen src="https://player.vimeo.com/video/115219608?h=008e4564e9&amp;autoplay=1&amp;loop=1&amp;color=ffffff&amp;title=0&amp;byline=0&amp;portrait=0&amp;wmode=opaque" width="1500" frameborder="0" height="1500"></iframe>

Again, no idea why Squarespace changes the embed code, or why "muted" isn't included by Vimeo, which seems to be "a thing" as far as I've read.

I'd be grateful for any advice. Thanks so much!

0.png

1.png

2.png

3.png

4.png

5.png

Edited by Scottotron
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.