api-samples icon indicating copy to clipboard operation
api-samples copied to clipboard

Is there is some way to embed a YT video with out blowing up core web vitals ?

Open daguitosama opened this issue 1 year ago • 0 comments

Im looking up a way to effectively embed YouTube videos on a website with out incurring in the huge performance hit you get when insert the video following the Iframe Api guidelines.

I have tried to use PartyTown to decouple the work from main thread but fails to load because of CORS errors.

Will like to ask if there is a better way to do the embed.

As you can see in the following Page Speed Insights capture, a simple iframe embed load tons of JS, and block the main thread very bad, it totally destroys the page performance.

Screen Shot 2022-11-30 at 19 20 36

daguitosama avatar Dec 01 '22 05:12 daguitosama