tjallingt/react-youtube

no-cookie option

Closed this issue · 6 comments

I ended up here from juliussohn/react-youtube-background which uses your component as the basis for their component.

Can you add a possibility to use www.youtube-nocookie.com as the source of the video, just without cookies, to make use of YouTube's enhanced privacy? Either by default or through an optional parameter.

(I also opened an issue about that in the basis of your component , just hoping that you will find a way to accept a no-cookie parameter from
the component which extends yours and pass it on to the youtube-player component.

Thank you.

I finally found time to dig through this myself and discovered that by passing {host: "https://www.youtube-nocookie.com"} in opts object makes this happen.

I'm closing this issue and hope it helps someone else.

As mentioned in https://axbom.com/embed-youtube-videos-without-cookies/, the no-cookie mode still stores a local storage device id that is, without consent, non gdpr compliant.

If the https schema is not provided (i.e. providing a host of //www.youtube-nocookie.com), onEnd and potentially other handlers do not fire even though video playback functions.

@bdefore the issue was that it switches to local storage to replace cookies. I guess it still does that with you trick.

What would be nice is to implement something like that:

@borisrorsvort i was raising this for others following @vedran-brnjetic suggestion as it was unexpected for me. i agree that it's not cool that google is disregarding GDPR in this way.