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

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation 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.

Buy me a coffee

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.