YouTubeEmbed
An @next/third-parties component that shows a light placeholder and loads the full YouTube player only when needed.
In more detail
A standard YouTube iframe loads a lot of JavaScript up front. This component shows a lightweight placeholder and loads the real player only when the user interacts.
Related terms
- @next/third-parties — A Next.js package of ready-made, performance-tuned components for popular third-party services.
- iframe — An HTML element that shows another web page inside a box on the current page, such as a video or map.
- lazy loading (web resources) — Waiting to load something, such as an image, script or video, until it is actually needed.
Taught in
- Script Optimization: next/script & Lazy Third Parties — Next.js 15 & Modern App Router Architecture