Settings

Theme

Show HN: A drop-in, open-source replacement for YouTube embed iframes

embedlite.com

3 points by corentin88 19 days ago · 2 comments · 1 min read

Reader

Hi HN! I built this some time ago to reduce the load size of YT iframes. It's serving us very well since then. Hope it'll help you too.

gisanokharu 18 days ago

the iframe bloat problem is real. been using lite-youtube-embed for similar reasons. curious how yours compares - do you render the thumbnail server-side or client-side, and how do you handle the cookie consent modal that youtube forces now

  • corentin88OP 18 days ago

    It's a static site that renders the youtube thumbnail + a red play button. When you click on it, it loads the youtube iframe. So it's basically deferring the cookie consent and all.

    We implemented it as a drop-in replacement:

      -- <iframe src="https://www.youtube.com/embed/aqz-KE-bpKQ">
      ++ <iframe src="https://www.embedlite.com/embed/aqz-KE-bpKQ">
    
    
    Nothing else needed.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection