justinribeiro / lite-youtube

The fastest little YouTube web component on this side of the internet. The shadow dom web component version of Paul's lite-youtube-embed.

Home Page:https://www.npmjs.com/package/@justinribeiro/lite-youtube

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poster image still gets lazy-loaded when setting posterloading to eager

jlmmns opened this issue · comments

<lite-youtube videoid="{{ video }}" posterloading="eager"></lite-youtube>

Results in:

<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy" src="..." aria-label="..." alt="...">

I'm using v1.4.0


There seems to be a hard-coded loading="lazy" when the shadow dom gets set up (I guess this is just the default setup):
/blob/main/lite-youtube.ts#L210

Maybe the "fallback" reference isn't working here:
/blob/main/lite-youtube.ts#L323