You have your own YouTube or Vimeo channel (or you asked for permission before embedding content from other persons) and you want a simple way to build a privacy friendly website with embedded videos.
But embedding external videos directly is a bad idea for multiple reasons:
- Privacy - Google tracks my visitors if a YouTube iframe loads videos on startup.
- EUGDPR - I have to ask my visitors before I can embed third party resources with tracking mechanisms
- Page speed - If my visitors don’t want to see a video, I don’t want to load the preview window with 1-2MB
The idea is simple:
- has a preview of the thumbnail
- stores an object with these keys:
It has no thumbnail preview, but it produces a simple html
<a> tag with all the data I need to embed it dynamically.
<a href="https://www.youtube.com/watch?v=fSdVs95Kesk" data-video-id="fSdVs95Kesk" data-video-provider="youtube" data-video-thumb="5cdf0b193338621488000156" data-video-width="480" data-video-height="360">Poledance-Show beim Kammgarnspinnereifest 2018</a>