I tried looking this up on old posts on the forums, but I think they're outdated now that the liquid has evolved.
Anyways, I would like to find a way to embed a video on my homepage's slideshow using the Brooklyn theme, just like we can with the Retina or Parallax themes, and to have the video play automatically. Here are a couple examples:
Does anybody know how to do this?
Please follow these steps:
Edit section Slideshow.liquid
Replace your Slideshow.liquid with this this code
Now you will find in theme settings under slide show there is 2 new options available with each slide
a) Mark check if it's video slide ( If checked code will override image and activate video code )
b) Add mp4 video name ( You have to add the name of mp4 video here and that video should be available in your theme assets )
when i implemented the code you sent nothing showed in the slider. when i look at the source code it outputs this. The videos name is 'samplevid', i'm not understanding why it places "?211" towards the end but it doesn't seem to be showing.
Any help would be great. the code looks amazing in the admin with the checkbox to add video.
<video autoplay muted loop playsinline="true" class="myVideo"> <source src="//cdn.shopify.com/s/files/1/0454/7025/3206/t/3/assets/samplevid?211" type="video/mp4" width="100%"> </video>