Releases: insin/astro-lazy-youtube-embed
Releases · insin/astro-lazy-youtube-embed
v0.5.4
v0.5.2
v0.5.1
v0.5.0
v0.4.0
Added
- Added a
thumbnailprop, enabling use of the alternate screenshot thumbnails YouTube provides - Added a
cookieflag prop to opt-in to usingwww.youtube.com/embedinstead ofwww.youtube-nocookie.com/embed - Added JSDoc to props to improve editor DX
Changed
- The embed now uses
www.youtube-nocookie.com/embedby default - The static embed thumbnail
<img>now usesloading="lazy"by default - The static embed now uses a black background, so there isn't a flash of gradient when the thumbnail
<img>lazy-loads - The static embed now uses
i.ytimg.cominstead ofimg.youtube.comfor the thumbnail<img>, as per the YouTube site and its API - The
modestbrandingembed parameter was deprecated by YouTube on August 15, 2023 and now has no effect - removed it from theembedParamsdefaults and marked it as deprecated - The
thumbnailResprop now also supports passing themq/hq/sdabbreviations YouTube uses
Fixed
- Fixed overriding defaulted
<iframe>attributes - Astro doesn't merge attributes on HTML elements, so user-supplied attributes need to come first
v0.3.1
Release v0.3.0
Astro 4 support
v0.2.0
v0.1.0
Breaking changes
- Changed the export from
defaultto a namedYouTubeexport - Renamed the
videoCodeprop tovideoIdto match what YouTube uses in their docs
New
- Added an
embedParamsprop to expose all the settings from the YouTube Iframe Player API- Default is
{autoplay: 1, modestbranding: 1}
- Default is
- Added a
thumbNailResprop to let you choose the thumbnail size/quality which is used- Default is
'standard'(which is bigger than'high'- go figure) - Not all videos have all thumbnail sizes (especially older ones), so you may have to tweak this on a per-video basis
- Default is
