Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images Loaded option but for video? #916

Closed
kaleidografik opened this issue Mar 8, 2019 · 4 comments
Closed

Images Loaded option but for video? #916

kaleidografik opened this issue Mar 8, 2019 · 4 comments

Comments

@kaleidografik
Copy link

Hi @desandro - I have a Flickity instance made up of images and videos. For the images to fit correctly, we have to activate the imagesLoaded option, however this doesn't work for videos. Instead, videos sit over to the left of the slider, until the browser is resized at which point they position correctly. This leads me to believe it's related to the video not having a set width until it is loaded, so is there an option we can use to ensure correct positioning of videos upon initial load?

Thanks

@desandro
Copy link
Member

desandro commented Mar 8, 2019

Yeah, imagesLoaded is only for <img> elements for now. Add your 👍 to desandro/imagesloaded#197

The video element does provide several native events. loadeddata might be useful here

See also #71 (comment)

@desandro desandro closed this as completed Mar 8, 2019
@kaleidografik
Copy link
Author

Thanks @desandro - this would be a nice feature to implement.
Any pointers regarding getting loadeddata to work some magic as a workaround?

@desandro
Copy link
Member

See #71 (comment)

@polemonade
Copy link

Hey! I just see #71 and doesn't work... There's a new solution for <video>?

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants