Jump to content

Custom code not working on live site

Recommended Posts

Hey guys, could really do with some help! 

I'm trying to figure out an issue with a basic piece of custom code not working with Squarespace. 

The code in question is below:

<center>
  <video autoplay="autoplay" loop="true" width="300">
    <source src="https://static1.squarespace.com/static/63c42a40636ad73a40b61949/t/63c45734cd040609661b246c/1673811785159/NO+MUSIC+-+Website+Home+Screen+.mp4" type="video/mp4"/>
  </video>
</center>

It works fine in design mode both for mobile and desktop but on the live site it's static and doesn't move at all. Attached is a video of how it should appear on the live site and a screenshot of what is currently happening. 

Any recommendations would be much appreciated. 

KC :) 

 

Screenshot 2023-01-23 at 10.29.43.png

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

1 hour ago, KCYourEdit said:

I'm trying to figure out an issue with a basic piece of custom code not working with Squarespace. The code in question is below:

<center>
  <video autoplay="autoplay" loop="true" width="300">
    <source src="https://static1.squarespace.com/static/63c42a40636ad73a40b61949/t/63c45734cd040609661b246c/1673811785159/NO+MUSIC+-+Website+Home+Screen+.mp4" type="video/mp4"/>
  </video>
</center>

Some notes about the format of your HTML:

  • autoplay="autoplay" is deprecated. You can include the attribute autoplay instead.
  • In some browsers, autoplay doesn't work if no muted attribute is present
  • loop="true" is also deprecated. As above, just include the attribute loop
  • the center element is deprecated and should be avoided. CSS should be used instead.

When I add this instead, it plays for me on a live test site:

<video autoplay loop muted width="300">
  <source src="//static1.squarespace.com/static/63c42a40636ad73a40b61949/t/63c45734cd040609661b246c/1673811785159/NO+MUSIC+-+Website+Home+Screen+.mp4" type="video/mp4">
</video>

Did this help? Please give feedback by clicking an icon below  ⬇️

 

Edited by paul2009

About: Squarespace Circle Leader since 2017. I value honesty, transparency, diversity and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™. 
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Catch up on all the release notes and announcements 2023 [for Circle members only]. There's a public version here too!
If I helped, you can thank me by clicking one of the emojis below. If you prefer, you can buy me a coffee.
Improve your online store with our extensions.

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.