macbookandrew / wp-youtube-live

Displays the current YouTube live video from a specified channel
20 stars 12 forks source link

Support YouTube's no-cookies domain #22

Open GermanKiwi opened 2 years ago

GermanKiwi commented 2 years ago

When generating an embed code for a video on the YouTube website, there is a checkbox called "Enable privacy-enhanced mode".

As explained here, "The Privacy Enhanced Mode ... prevents the use of views of embedded YouTube content from influencing the viewer’s browsing experience on YouTube."

It results in the URL within the embed code changing from https://www.youtube.com/embed/xxxxxx to https://www.youtube-nocookie.com/embed/xxxxxx which means no cookies are downloaded onto the viewer's computer. This is also beneficial for jurisdictions where cookies are not allowed without prior consent, such as in the European Union.

Please consider adding a new setting to the plugin settings, which makes the plugin use https://www.youtube-nocookie.com for all of the iframes it generates on the front-end.