Jump to content

YouTube Video AutoPlay Not Working

Go to solution Solved by humxahafeex,

Recommended Posts

Posted

Site URL: https://spiritandspark.com/summit

Hello! I am trying to "embed" the code from one of my YouTube videos onto my Squarespace page so that it will play automatically.

The video code is:

<iframe width="560" height="315" src="https://www.youtube.com/embed/SRS8D2mehFs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

I know that ?autoplay=1 needs to be placed somewhere so that the video automatically plays when a visitor comes to the website page. I've tried a few variations and I can't seem to get it to work.

Can someone please respond with the code to use or where ?autoplay=1 goes?

Thank you!

  • Replies 7
  • Views 10.6k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution
Posted
10 minutes ago, Dallisa said:

Site URL: https://spiritandspark.com/summit

Hello! I am trying to "embed" the code from one of my YouTube videos onto my Squarespace page so that it will play automatically.

The video code is:

<iframe width="560" height="315" src="https://www.youtube.com/embed/SRS8D2mehFs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

I know that ?autoplay=1 needs to be placed somewhere so that the video automatically plays when a visitor comes to the website page. I've tried a few variations and I can't seem to get it to work.

Can someone please respond with the code to use or where ?autoplay=1 goes?

Thank you!

Hi , Just replace your code with this one it will work. 

<iframe width="560" height="315" src="https://www.youtube.com/embed/SRS8D2mehFs?autoplay=1&loop=1&autopause=0&muted=1"   allow="autoplay" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Please do mark it solved if it helps. 

Posted
8 minutes ago, humxahafeex said:

Hi , Just replace your code with this one it will work. 

<iframe width="560" height="315" src="https://www.youtube.com/embed/SRS8D2mehFs?autoplay=1&loop=1&autopause=0&muted=1"   allow="autoplay" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Please do mark it solved if it helps. 

Hmmm... that isn't working. To be sure I'm on the same page:

1) I clicked to add "Embed" Block

2) I clicked the "Embed Data" </>

3) I copy/pasted the code

But nothing appears. No video on the website page. Suggestions?

Posted
15 minutes ago, humxahafeex said:

Just opened up the link on my end it's playing video on autoplay would you please try to refresh or check in incognito mode? 

I tried it in Edge & Chrome (Incognito) and on my iPhone and it didn't work on any of those devices.

Posted

Close, you need to put "&autoplay=1" not "?autoplay".

Add that to the end of the Video ID at the end of the youtube URL.

It should say:

<iframe width="560" height="315" src="https://www.youtube.com/embed/SRS8D2mehFs&autoplay=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

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.