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

Get expected size of video asset during SSG to create placeholder #14

Open
sjstark opened this issue Oct 17, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@sjstark
Copy link
Member

sjstark commented Oct 17, 2022

Just a thought at this point and haven't really thought about where to do it, but figured since we're more often than not generating our sites, we could get the expected aspect ratio of a video during generation to create a placeholder at the correct size to prevent sites jumping when the asset loads...

Further more, if we're really feeling it, I bet we could grab the first frame of the video for a placeholder image... but that may be more effort than is worth.

@sjstark sjstark added the enhancement New feature or request label Oct 17, 2022
@sjstark sjstark changed the title Get expected size of video asset while SSG to create placeholder Get expected size of video asset during SSG to create placeholder Oct 17, 2022
@weotch
Copy link
Member

weotch commented Oct 18, 2022

Ooooh, caching the aspects to disk during SSG is s cool idea. I think we could even use Nuxt's fetch() hook for that ... and this package makes it look pretty easy: https://www.npmjs.com/package/get-video-dimensions. Cool idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants