android-youtube-player icon indicating copy to clipboard operation
android-youtube-player copied to clipboard

Is Privacy-enhanced mode available?

Open almozavr opened this issue 4 years ago • 1 comments

Hello,

with the rise of GDPR there is a new youtube option for embedded mode, called privacy-enhanced mode. Currently, I don't find a way to turn it on somehow.

The question is: do you think it's doable in terms of the present library approach?

Note: I've found some undocumented behaviour for iframe API, which seems to turn the mode on: https://portalzine.de/dev/api/youtube-iframe-api-and-cookieless-domain-solution-gdpr-dsgvo/ If anyone sees a good way to add such an option to the library, please advise me with a proper approach, so I could implement it into the PR.

almozavr avatar Nov 11 '20 12:11 almozavr

A quick dirty way to implement it locally without library change: put to your app's res/raw a copy of the html library uses to call iFrame API with a new host property of YT.Player code:

player = new YT.Player('youTubePlayerDOM', {
    	host: 'https://www.youtube-nocookie.com',	        
...

almozavr avatar Nov 11 '20 12:11 almozavr