Jump to content

Playing Background videos while overing with cursor

Recommended Posts

Site URL: https://marcotronconi.com/

Hello there, 

I'm new into coding. In my website https://marcotronconi.com/ I would like to add a line of code that plays the thumbnail video (see the upper first thumbnail) only when overing with cursor and returns as a static image when not overing. (similar to the current youtube thumbnail experience..)
The url for the YT video is https://youtu.be/rZBLXaa4cgw

The media (so the url) is pasted in: Page setting> media 
Will the code be injected in page settings > advance / or /  as a "code" content block inside the interested page?

I have the personal plan, so i can only use css. 

Thanks a lot, and greetings from Italy,
Marco

Link to comment

@rwp

 

Here's a YT tutorial  similar to what i need to achieve. The biggest difference is that i need to put static image and gif as thumbnail of a page, so exterior from the page itself (see https://marcotronconi.com/ thumbnail I am reffering to are the "cover images" form the clickable page)  Where should i code inject? From design > custom Css / or / as a "code" content block inside the interested page?

Thanks

Link to comment
  • 4 weeks later...

OK, I was finally able to figure this out with youtubes API.

I have a client that requested something similar, so I had to really get into this......

https://codepen.io/r-w-p/pen/KKzeVmb

Currently not working 100% in firefox, you have to click play to get it to start working. Not sure whats up with that yet.

Edit: fixed on firefox...... I hope.....

Edited by rwp
Link to comment
On 9/13/2020 at 12:56 PM, rwp said:

OK, I was finally able to figure this out with youtubes API.

I have a client that requested something similar, so I had to really get into this......

https://codepen.io/r-w-p/pen/KKzeVmb

Currently not working 100% in firefox, you have to click play to get it to start working. Not sure whats up with that yet.

Edit: fixed on firefox...... I hope.....

eh... shows a play button and when mouse isn't over it shows 'other videos' etc. Not very visually appealing.

Link to comment
3 minutes ago, baxley said:

eh... shows a play button and when mouse isn't over it shows 'other videos' etc. Not very visually appealing.

Those are limitations of the YouTube API.

Squarespace will not let you host videos, short of setting up your own hosting, that's about what we are limited to.

Link to comment
  • 3 months later...

Hi guys! I came across your thread after searching for a similar solution for my Squarespace website. 

This is my inspiration: https://www.marker.net/en/alpinist/

@rwp, did you get any progression on this thing or did you "settle" for the youtube version you made? It's already quite nice, but yes a bit annoying with the YT texts and buttons.

Link to comment
  • 2 years later...
  • 6 months later...
  • 3 months later...

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.