Jump to content

Slider/Carousel of Videos on Auto-Play (no video controls shown)

Recommended Posts

No not really, you can't add videos to a gallery section.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

You can try this approach to add video to Gallery Section (Tested with Gallery Grid. I haven't tested with Slideshow yet.)

First, add code to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('figure[class*="gallery-"] video').closest('figure').addClass('hide-image');
});
</script>

Next, add this code to Custom CSS

/* hide gallery section images */
 .hide-image [class*="-item-wrapper"] {
 display: none !important;
 }

Edit Gallery Section > edit each image > Enter this format to Caption  (code is a bit different because I added loop and autoplay)

<video width="100%" height="240" controls loop autoplay>
  <source src="https://www.w3schools.com/tags/movie.mp4" type="video/mp4">
</video>

image.png.12b7d18655f54dabf94d96dd5fc245c6.png

You can repeat similar for other images, just replace .mp4 with new mp4 video url.

image.png.eff296826d045d48d8f2eb5a30af64dd.png

Result

Gallery Section Video3 Min

Make sure Caption is enabled

image.png.a2ba24b8eeaf2190db0021d4179f8fc3.png

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!)

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.