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 197
  • 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.

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

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.