2 ms·
i shared my solution here for anyone who wants an alternative to lite youtube embed (worked on it before knowing about paul's solution, has perhaps better trade
by swyx 2y ago
i shared my solution here for anyone who wants an alternative to lite youtube embed (worked on it before knowing about paul's solution, has perhaps better tradeoffs with regards complete customizability)
https://swyxkit.netlify.app/faster-youtube-embeds https://swyxkit.netlify.app/faster-youtube-embeds
- insin 2y agoI made a component for Astro sites which uses the <iframe srcdoc> solution. As a bonus you get a typed interface to the embed parameters when you need to use them: https://github.com/insin/astro-lazy-youtube-embed#readme https://github.com/insin/astro-lazy-youtube-embed#readme Example of a page with a dozen embedded videos: https://jbscript.dev/notes/undefined/the-banterbox https://jbscript.dev/notes/undefined/the-banterbox