question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for youtube-nocookie.com

See original GitHub issue

Youtube provides a service to integrate a video without leaving a cookie if the user does not click on play. It simply use the form youtube-nocookie.com/embed/youtube_id.

I’d love to be able to do something like:

<ReactPlayer url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" config={{
    youtube: {
        noCookie: true
    }
}}/>

That would convert https://www.youtube.com/watch?v=dQw4w9WgXcQ to https://youtube-nocookie.com/embed/dQw4w9WgXcQ automatically.

However if you think this should be handled by a parent component, I’d like to be at least able to provide a youtube-nocookie url to ReactPlayer (which would be a 14 characters change in the code 😉).

Tell me which one you prefer so I can work on a PR.

Ps: You can check that this is legitimately owned by Google here: https://www.whois.com/whois/youtube-nocookie.com

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
cookpetecommented, Jan 24, 2019

In 1.9.0 I’ve added embedOptions to the youtube config that lets you pass in a custom host option:

<ReactPlayer
  url='...'
  config={{ 
    youtube: { 
      embedOptions: { 
        host: 'https://www.youtube-nocookie.com' 
      } 
    } 
  }}
/>

And override any other options in future, if you want to.

1reaction
AlexandreKiliancommented, Jan 24, 2019

@Betree @CookPete there is actually a way, it’s just not documented… I can make a pull-request right away 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for youtube-nocookie.com domain [#2971482] - Drupal
Youtube: Support for youtube-nocookie.com domain ; Needs review ; Project: Video Filter ; Version: 7.x-3.x-dev ; Component: Code ; Priority: Normal.
Read more >
youtube-nocookie.com - New official privacy-enhanced ...
https://tip.tm/ youtube-nocookie -gdprUse this privacy-enhanced embed code for all your YouTube video embeds.More tips to help you grow!
Read more >
Support for youtube-nocookie.com · Issue #272 - GitHub
Youtube provides a service to integrate a video without leaving a cookie if the user does not click on play.
Read more >
youtube-nocookie.com - New official privacy-enhanced ...
Use this privacy-enhanced embed code for all your YouTube video embeds. More tips to help you grow! ➜...
Read more >
Embed YouTube videos without cookies - axbom
It turns out that YouTube's official URL for embedding videos that do not set a HTML cookie immediately is youtube-nocookie.com.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found