Jump to content

Add Header video in York Template

Recommended Posts

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
  • Replies 2
  • Views 231
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment

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

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.