Jump to content

How to keep Youtube embedded video from showing other videos at end?

Recommended Posts

Posted

Site URL: https://seadragon-seahorse-8fae.squarespace.com/config/pages

Hi. I'm trying to have an embedded short animated banner on my page.  At the end of the short video, I want it to stay on the last frame, and Not show other Youtube video choices.  This is supposed to be for my homepage eventually, once I've worked out the kinks.  I have not published my site yet, but any help with a code that can keep the main video last frame or any frame showing is much appreciated.  Thanks, Jenny

 

  • Replies 2
  • Views 3k
  • Created
  • Last Reply
Posted

Youtube changed the options for embedding and you can't just disable it.

Your options are:

  1. Use the rel=0 switch to make it so that the videos that are suggested only come from your youtube channel. you'd have to do this with an embed block rather than the video block as squarespace override the embed options
  2. Use some Javascript code which listens to the videos events and places a picture over the video when it stops.

This blog has some code on it, which I've just tested on a 7.1 site with an embed block and works just fine: How To Hide Related Videos In YouTube Embeds (in 2021) - Maximillian Laumeister (maxlaumeister.com). (he also talks about the rel=0 option). Put an embed block in, and then click the little </> icon to the right of the URL. paste in the code from max's website, and make sure to change the bit he's highlighted with your own YouTube video code

image.png.7a30261de44e2e01ebc0c432eb800c53.png

 

 

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

Posted

I think you can upload video to your site then add it with Video tag in Code Block. Something like this

<video width="320" height="240" controls>
  <source src="entner video file url here" type="video/mp4">
  Your browser does not support the video tag.
</video>

or upload video then use Video Plugin by @WillMyers The plugin has a lot of nice options

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Archived

This topic is now archived and is closed to further replies.

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