KCYourEdit Posted January 23, 2023 Share Posted January 23, 2023 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 :) Screen Recording 2023-01-23 at 10.27.46.mov Link to comment
paul2009 Posted January 23, 2023 Share Posted January 23, 2023 (edited) 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 January 23, 2023 by paul2009 About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥. Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links. Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment