metafizzy / flickity

:leaves: Touch, responsive, flickable carousels
https://flickity.metafizzy.co
7.5k stars 604 forks source link

<video> + <img> together #1258

Closed philipfarmer closed 1 year ago

philipfarmer commented 1 year ago

Hi there,

I was hoping someone could help with an issue i'm encountering when using both html5 video and images together in a slider. It's not something i've come across in any examples online

At first glance it appears to work but with different options added (e.g autoplay) the gaps between the items begins to shrink at times and other times there are larger gaps as if the video is running outside of the slider itself

I've created a pen here: https://codepen.io/phlp/pen/bGKYajO

Look forward to hearing if anyone has any suggestions, this has been a serious (months long at times headscratcher for me!)

thanks

vozaldi commented 1 year ago

I think you need to set width and height attribute for the videos

For example: <video .... width="480" height="640">...</video>