Tracker-free youtube embedding
Posted 2022-04-03 18:04. Tagged web, kakor, meta, rust, gdpr, r4s.
Sometimes I want to embed a video on my site.
Most of the videos I want to embed are on youtube.
Klicking share
on a video and choosing embed, I get a bunch of html
code I can copy into a post.
Something like this, for example:
< iframe width ="560 " height ="315 " src ="https://www.youtube.com/embed/3St1CoH1rKU "
title ="YouTube video player " frameborder ="0 "
allow ="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture "
allowfullscreen >
</ iframe >
That’s very easy. The downside is that youtube gets a request for the iframe (and a bunch of stuff it loads from there) every time someone looks at my page, which makes it possible for them to track you, my reader, across my site and other sites that includes videos.
