Learn Performance - Video
lite-youtube-embed
This demo uses the YouTube facade
lite-youtube-embed
.
No requests are done to the third party until the user interacts with the video and initiates playback.
The below waterfall illustrates the resources required to render this page.
There are a total of 5 requests, only one of which is to the third party -
the poster image
hqdefault.jpg
. The poster image is visible at 2.2 seconds, at least twice as fast as the YouTube embed.
View Source Code
<lite-youtube videoid="CWTm0ccfZe4" playlabel="Google I/O ‘22 in Under 12 Minutes"></lite-youtube>