sampotts / plyr

A simple HTML5, YouTube and Vimeo player
https://plyr.io
MIT License
26.59k stars 2.93k forks source link

noCookie option continues to set tracking cookies #2503

Open juliengiombetti opened 2 years ago

juliengiombetti commented 2 years ago

Expected behaviour

The noCookie option does NOT insert any tracking cookies from youtube.

Actual behaviour

The noCookie option continues to insert two important cookies: YSC and VISITOR_INFO1_LIVE (which are tracking cookies). I think it's related to the call at the API for the iframe (https://www.youtube.com/iframe_api). Is there another way to do this ?

Steps to reproduce

const players = Array.from(document.querySelectorAll('.player')).map((p) => new Plyr(p, { youtube: { noCookie: true } }));

<div class="player" data-plyr-provider="youtube" data-plyr-embed-id="Cp9pk-FkE6E"></div>

Environment

Link to where the bug is happening

https://codepen.io/juliengiombetti/pen/OJvRVaR

gregogalante commented 2 years ago

Getting same problem. Any solution?

ffxsam commented 1 year ago

Are you sure this is an issue? I tested on my own site, and there are no cookies being set under the youtube domain nor youtube-nocookie domain.

Also, that cookie on Codepen is a result of Codepen itself (note the cookie domain is google.com). If you open the full-page version (https://codepen.io/juliengiombetti/full/OJvRVaR), you can see there are no cookies being set:

CleanShot 2022-12-28 at 14 19 27@2x

dr-format-d commented 1 year ago

I agree. We are also still having this issue. If you set noCookie: true it will be completely ignored apparently.

grafik grafik grafik