PipeCamara Posted July 18, 2022 Share Posted July 18, 2022 Site URL: https://pipecamara.squarespace.com/config Hi! I use York template and I want to show a video reel in the main page header. I've found an old code but it doesn't play anything: <video width="100%" height="43.75%" id="identvideo"> <source src="/s/in-the-pr-room.mp4" type="video/mp4"> <source src="/s/in-the-pr-room.ogv" type="video/ogg"> </video> <img src="/s/in-the-interiors-pr-room.jpg" width="100%" height="43.75%" id="mobilefallback"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $( document ).ready(function() { function play_video(){ $('#identvideo').get(0).play() }; window.setTimeout( play_video, 1500 ); // 1.5 seconds }); </script> I want to embed a video from vimeo in the header, any tips? Thanks! Link to comment
paul2009 Posted July 18, 2022 Share Posted July 18, 2022 17 minutes ago, PipeCamara said: I use York template and I want to show a video reel in the main page header. I've found an old code but it doesn't play anything You shouldn't need code to play a Vimeo video as a background video in the header. See Adding background videos. 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
PipeCamara Posted July 18, 2022 Author Share Posted July 18, 2022 Thanks for answering! But Ive tried all the steps I found in the forum but no one works. I have this CCS code: #header { position: sticky; top: 0; } #canvas { max-width: 100% !important; } #header { background: white; } Maybe this doesnt allow videos in bg 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