api-samples
api-samples copied to clipboard
Is there is some way to embed a YT video with out blowing up core web vitals ?
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.