Since we have to comply with the Cookie law in EU, one of the services setting cookies is YouTube. The so called privacy-enhanced mode is acceptable by the law cause it sets cookies after the user starts playing video.
The change in embed code is very small - the src attribute must be from domain youtube-nocookie.com. All the rest is the same.
I found that the embed code is generated in video_embed_field.handlers.inc in function called video_embed_field_handle_youtube($url, $settings).
I'm not very experienced in creating patches but an extra setting and small modification in output could give this functionality. If someone is interested to help on this, I would appreciate it.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | privacy_enhanced_mode-2016901-12.patch | 2.13 KB | bomoko |
| #5 | privacy_enhanced_mode-2016901-5.patch | 1.98 KB | nmillin |
Issue fork video_embed_field-2016901
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
Peter76 commentedChange on line 111 in file video_embed_field.handlers.inc src="http://www.youtube.com/embed/ to src="http://www.youtube-nocookie.com/embed/.
Comment #2
TS79 commentedsubscribe
... important setting in EU; I have to overwrite the 'function' handler for youtube at the moment:
Comment #3
giupenni commentedVery important issue for new Cookie law in EU
Comment #4
enxox commentedsubscribe
Comment #5
nmillin commentedI've added a patch that adds a checkbox that allows people to enable no cookie per video style (example on /admin/config/media/vef/vef_video_styles/list/normal/edit). By default this isn't enabled so there is no functionality change.
Comment #6
upunkt commented@nmillin Thanks for your work, I do appreciate that. Unfortunately it doesn't help against the DoubleClick tracker script but that's Youtube's fault.
Comment #7
giupenni commented#5 work for me.
Comment #8
tfranz commented#5 works for me, too.
But additionally i added the domain 'youtube-nocookie.com' to the allowed domains in line 28 of video_embed_field.handlers.inc :
Comment #9
upunkt commentedTo become GDPR compliant we have to deal with the problem that the user IP gets transmitted as soon as a page with an embedded video is loaded, plus data from fonts.gstatic.com and ytimg.com is acquired. A better solution could be what I suggested here:
https://www.drupal.org/project/video_embed_field/issues/2973246#comment-...
I'm not capable to work on this task, though.
Comment #10
anybodyWe need a rerolled patch from #8
Comment #11
anybodyNew patch should be against DEV. To sum up: This is the Drupal 7 issue while the Drupal 8 issue can be found here: #2973246: Youtube Privacy Enhanced Mode (using -nocookie.com) (D8)
Comment #12
bomoko commentedRerolling patch to include #8
Comment #13
bomoko commentedComment #14
anybodyComment #15
stewesthttps://www.drupal.org/project/video_embed_field/issues/2016901#comment-... Works on Drupal 7.56
Comment #16
stewestComment #17
zhouhana commentedActually, even if I type in the URL starting with www.youtube-nocookie.com, the URL that is actually written out in the HTML source becomes www.youtube.com Am I the only one having this issue? If not, this issue is not solved.
Comment #18
zhouhana commentedComment #19
helmo commented@zhouhana: looks like it, seems to do the trick here.
Comment #20
anybodyFor those who prefer a Two-Click solution may want to have a look at https://www.drupal.org/project/video_embed_mytube
I'd like to see many helping hands, but it already works basically.
Comment #21
chris matthews commented