Embed YouTube video via a cookieless domainPrevious article
Since the EU Cookie Law and the new General Data Protection Regulation law the use of (tracking) cookies is controversial. You need a cookie consent feature when embedding YouTube videos at your website to comply with these laws...
I was looking for a way to embed YouTube videos without asking for consent to set cookies. Thought of, and created, very complex cookieless (sub)domains, iframes in pop-ups, etc... But the solution is *very* simple.............. TOO [beeeep] SIMPLE!!!
How to use
The solution is add "-nocookie" to the domain name!! youtube-nocookie.com is a domain that won't set cookies when you watch videos...
The usual method
Thanks for the addition, Arnoud
Thank you for this blog. Serving video's via the nocookie domain stopped some anoying advertisements seen on a view videos I shared.
I share most of my video's with the hd=1 parameter for non mobile and hd=0 for mobile devices, I use CGExtensions to determine the device type.
$cge = cms_utils::get_module('CGExtensions');
$browser = new Browser();
$ismobile = $browser->isMobile();
According to the player_parameters documentation "showinfo": Note: This parameter is deprecated and will be ignored after September 25, 2018.
How instagram video or image embed ??? Please your code