Privacy-enhanced mode for YouTube embed (D7)

Created on 11 June 2013, about 12 years ago
Updated 24 April 2025, 3 months ago

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.

Feature request
Status

RTBC

Version

2.0

Component

Code

Created by

🇸🇮Slovenia boshtian

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
Production build 0.71.5 2024