Skip to content

Conversation

@jonrouleau
Copy link

  • Add posterFormat prop to <YouTube> to allow selecting between jpg and webp posters
    • Not all videos have webp posters

@changeset-bot
Copy link

changeset-bot bot commented Apr 10, 2024

🦋 Changeset detected

Latest commit: 7e97da1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@astro-community/astro-embed-youtube Minor
@astro-community/astro-embed-integration Patch
astro-embed Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@delucis
Copy link
Owner

delucis commented Apr 10, 2024

  • Not all videos have webp posters

Ahhh, I didn’t know that! Maybe we should revert the change that switched to webp in that case? I wonder if there’s a reliable way to get the available images? If so, we could only use webp when available, but if not, I think it’s probably better to stick to the format that is reliably available by default.

@jonrouleau
Copy link
Author

I wonder if there’s a reliable way to get the available images?

Not without a fetch I don't think (e.g. to the YouTube API to get the list of thumbnails)

I have added a commit that reverts the default to jpg and allows selecting webp via posterFormat="webp"

@delucis
Copy link
Owner

delucis commented Apr 10, 2024

Thank you! I think let's remove the posterFormat prop entirely for now. We have another in progress PR (#111) suggesting using Astro's built-in tooling to allow downloading and optimizing poster images, so we can leave the WebP optimization as an opt-in thing that way, rather than this prop which I guess most people would forget to use.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants