delucis / astro-embed

Low-JavaScript embed components for Astro websites
https://astro-embed.netlify.app
MIT License
213 stars 35 forks source link

Enhance embed with GDPR-compliant user consent mechanism #137

Open deployn opened 3 months ago

deployn commented 3 months ago

I would love to see an improvement for e.g. the YouTube component to be GDPR compliant by implementing a user consent mechanism before loading any YouTube content or cookies.

Current Behavior

Proposed Changes

  1. Keep the initial image thumbnail display.
  2. Implement a consent modal that appears when a user first attempts to play a video.
  3. Store user consent preference using localStorage.
  4. Load YouTube content only after receiving user consent.
anotheri commented 5 days ago

This is one of the solutions for it: https://cookieconsent.orestbida.com/