Mike T Posted January 23, 2013 Share Posted January 23, 2013 (edited) Hi. I have tried to embed code from both Vimeo and Youtube using their automatic startup code option (under share options) but when I run it it stills requires me to click the play button. Any ideas on how to do this would be appreciated, either Youtube or Vimeo is fine. Edited July 16, 2016 by llogan greenclover 1 Link to comment
Solution foleyatwork Posted January 23, 2013 Solution Share Posted January 23, 2013 (edited) Disclaimer: I almost always think autostarting videos is a terrible idea. Just my personal opinion. Please do good, not evil, with this answer. With YouTube you can just add ?autoplay=1 to the end of the iframe URL. For instance: <iframe width="420" height="315" src="http://www.youtube.com/embed/4KRZQQ_eICo?autoplay=1" frameborder="0" allowfullscreen></iframe> Edited January 23, 2013 by foleyatwork Developer Evangelist at Squarespace. Link to comment
Mike T Posted January 23, 2013 Author Share Posted January 23, 2013 I know what you mean about auto starting. I tried inserting the code and it does not seem to work; I even tried copy and pasting the entire line of code above no luck there either (it plays ok, but not automatically). I'll keep trying .. Link to comment
foleyatwork Posted January 23, 2013 Share Posted January 23, 2013 Autoplays for me. how are you adding the code? Developer Evangelist at Squarespace. Link to comment
Mike T Posted January 23, 2013 Author Share Posted January 23, 2013 I go to the video on Youtube, click on share, go to the embed option, cut and then in the Squarespace editing screen paste it into embed code (gear icon), then save. Maybe the Squarespace theme I have does not support that? I also tried just copying the code above and pasting it into the embed code window. The video works, just not automated. The link above autoplays for me when I go to it directly outside of Squarespace. Link to comment
foleyatwork Posted January 23, 2013 Share Posted January 23, 2013 Forget the video block. Just drop the code into a code block. That's what I did and it worked. Developer Evangelist at Squarespace. Link to comment
Mike T Posted January 23, 2013 Author Share Posted January 23, 2013 That worked great, thanks for your help! Link to comment
jgennick Posted February 2, 2014 Share Posted February 2, 2014 Just thought I'd add a comment to share my recent experience. I had an iframe tag for embedding a video that is a countdown time to an upcoming event, and thus having the video play automatically is desirable. Dropping the tag into a code block was not ideal, as the code block was not responsive to browser window changes. I was placing two videos side-by-side, so having them resize was important. One would resize, and the other would not. I ended up discovering that I could use a video block while also dropping in the iframe tag I had been given. I clicked the gear icon to the right of the URL box. That opened an Edit Embedded Data dialog. I took a shot and pasted the iframe tag into that box, and that did the trick. Despite the iframe tag including a width and a height, the video resizes along with the browser screen, and I'm able to have my two videos side-by-side. One is a countdown timer that auto starts. The other is a video that the user must click to play. SBLTN 1 Link to comment
zula Posted December 19, 2015 Share Posted December 19, 2015 Using a video block on a page in Squarespace 7, I was able to have a Vimeo video auto-play by adding ?autoplay=1 to the end of the URL for the video. It will also work in an iframe. Link to comment
zula Posted December 19, 2015 Share Posted December 19, 2015 Using a video block on a page in Squarespace 7, I was able to have a Vimeo video auto-play by adding ?autoplay=1 to the end of the URL for the video. It will also work in an iframe. Link to comment
lisellarson Posted January 12, 2016 Share Posted January 12, 2016 @foleyatwork I'm embedding code from our companies wire drive - so it's not on Youtube or Vimeo. Here is the embedded code. Could you show me where to add the auto play within this block? Thanks for your help - i'm not a coder...but trying my best to figure it out. Cheers Link to comment
vivaloo Posted January 17, 2016 Share Posted January 17, 2016 Is there a way to add a delay to the auto play? Link to comment
vivaloo Posted January 17, 2016 Share Posted January 17, 2016 Is there a way to add a delay to the auto play? Link to comment
Guest Posted April 7, 2016 Share Posted April 7, 2016 Hey I was wondering if you would could post this code. I am also trying to get multiple videos to autoplay and would love if they were responsive. Any help would be appreciated. Link to comment
Guest Posted August 22, 2016 Share Posted August 22, 2016 You are a genius (even 3 years later). Thank you! Link to comment
AskQuesty Posted August 10, 2019 Share Posted August 10, 2019 Hi @Mike T, I made a video tutorial for you on can autoplay a video. Hope this helps! https://www.askquesty.com/squarespace-answers/code-block-squarespace-tutorial Have Squarespace questions/task and need help today? **You can hire us here.** Our answers are on-demand, video recorded, and only cost between $5 to $25. Estimates are free, 100% satisfaction guarantee, and trusted by hundreds of small businesses. Link to comment
Guest Posted August 28, 2019 Share Posted August 28, 2019 @AskQuesty Above link no longer works Link to comment
jtruong212 Posted April 10, 2020 Share Posted April 10, 2020 Has anyone been able to solve this yet for 7.0? I have tried many things and always get some videos that will play and some that won't randomly ARTSPEAKNYC 1 Link to comment
Nick_SquareKicker Posted October 17, 2020 Share Posted October 17, 2020 Hi know this is an old post, but I thought I'd chime in. I've manage to do this, and it pretty easy really. I'm using Vimeo, and I have used the below iframe inside Squarespace's video block, not a code block. But instead of adding the link, you can click <> and insert this code. I am using it on our new SquareKicker website for our learn page here: https://squarekicker.com/learn Just swap out the vimeo number for yours. See screenshot below for example. <iframe src="https://player.vimeo.com/video/466007910?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> It also will auto play on mobile. You can adjust the settings for controls back to 1 instead 0. And muted is background=1, so if you want sound change that, switch it to 0. byemilyjane and Patch 1 1 Hi, I'm Nick a 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. Pro Extension ● Squarespace Template Store ● Inspiration ● Tutorials ● Resources Link to comment
Skylab Posted February 23, 2021 Share Posted February 23, 2021 (edited) Hello. I had the same problem. I uploaded a video to Vimeo, I stopped using Youtube, Vimeo is just way easier to use for embedding video and has better quality playback. I used a "video block" and entered the following code using the "embed data" feature in the video player settings: <iframe src="https://player.vimeo.com/video/REPLACE WITH YOUR VIMEO CODE HERE?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> I did change the width and height to what I needed, I recommend you do the same also. This was posted by NickIppolito above. I can tell you it works on the Brine Template for 7.0 as thats what my site is built on. My video auto-plays and keeps looping which is what I needed. My video doesn't have any sound so I can't comment on that. Edited February 24, 2021 by Skylab Nick_SquareKicker 1 Link to comment
whitney.revoir Posted March 30, 2021 Share Posted March 30, 2021 Vimeo has the code here: https://vimeo.zendesk.com/hc/en-us/articles/115004485728-Autoplaying-and-looping-embedded-videos Here's the code they provide: <iframe src="https://player.vimeo.com/video/76979871?autoplay=1&loop=1&autopause=0" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> I used a video block and opened up the brackets. Then dropped the code in and changed the video player link to my video (the numbers before the "?". KateDesigner 1 Link to comment
fintantio Posted April 7, 2021 Share Posted April 7, 2021 Hi All, i have a intro video that i want displaying full bleed, with audio, autoplay and play on mobile. I have been speaking to support and they say 'This isnt possible on squarespace, you need custom code' i have no idea how to do this. currently i have added my video as a background video on my home page. This auto plays but no audio and it doesn't play on mobile. I have iphone 10 and fast internet. Please can someone help me, 99% of the website traffic will be mobile so i want the video to play. Thanks Adam Link to comment
KateDesigner Posted July 23, 2021 Share Posted July 23, 2021 On 3/30/2021 at 11:54 AM, whitney.revoir said: Vimeo has the code here: https://vimeo.zendesk.com/hc/en-us/articles/115004485728-Autoplaying-and-looping-embedded-videos Here's the code they provide: <iframe src="https://player.vimeo.com/video/76979871?autoplay=1&loop=1&autopause=0" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> I used a video block and opened up the brackets. Then dropped the code in and changed the video player link to my video (the numbers before the "?". Thank you for this, Whitney! Link to comment
jenartsquare Posted February 10, 2022 Share Posted February 10, 2022 I made a video looping and autoplay, then wanted it to stop. I have tried every code everyone has listed here, and put '0' in place of the '1'. To no avail. The video used to need to autoplay and loop because it was just for visual effect. Now it has narration and I give the viewer the option to click on it. So the autoplay has stopped, but it continues again when complete. I am so frustrated. Vimeo can't even figure out a workaround. It must be on the Squarespace end. PLEASE HELP! @tuanphan or anyone who is listening. This is the default embed code Vimeo has for the video. <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/661047520?h=310e582965&badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="PV_Legacy_IntroVideo.mov"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> Link to comment
Nick_SquareKicker Posted February 13, 2022 Share Posted February 13, 2022 On 2/11/2022 at 1:29 AM, jenartsquare said: I made a video looping and autoplay, then wanted it to stop. I have tried every code everyone has listed here, and put '0' in place of the '1'. To no avail. The video used to need to autoplay and loop because it was just for visual effect. Now it has narration and I give the viewer the option to click on it. So the autoplay has stopped, but it continues again when complete. I am so frustrated. Vimeo can't even figure out a workaround. It must be on the Squarespace end. PLEASE HELP! @tuanphan or anyone who is listening. This is the default embed code Vimeo has for the video. <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/661047520?h=310e582965&badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;" title="PV_Legacy_IntroVideo.mov"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script> Is this a background video, a video block, or a code block your using this? You can try instead of adding the entire iframe and script to just the Vimeo url to a video block. Hi, I'm Nick a 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. Pro Extension ● Squarespace Template Store ● Inspiration ● Tutorials ● Resources 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