-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for youtube-nocookie.com #272
Comments
ReactPlayer uses the YouTube iFrame API to play videos. To support this, the API needs to support it. I can't find any documentation about a Adding to the youtube URL pattern wouldn't do much, because it's only used for the |
Thanks for the response, it's indeed undocumented. But you can actually activate the option from Youtube's share menu, so I guess it's not deprecated: What about implementing it as a new provider that would put the URL directly in a IFrame ?
|
Yeah I don't think it's deprecated, but it's just not part of the iFrame API. Unfortunately, it looks like you lose all events and interactions with the player in nocookie mode:
The only way ReactPlayer will be able to support this is if they add nocookie support to the iFrame API, to retain the existing methods and event hooks. Otherwise there is no point using ReactPlayer and you might as well just render |
I definitely rely on ReactPlayer events and hooks so the iframe will not work for me. |
In <ReactPlayer
url='...'
config={{
youtube: {
embedOptions: {
host: 'https://www.youtube-nocookie.com'
}
}
}}
/> And override any other options in future, if you want to. |
I notice that the demo app ( https://cookpete.com/react-player/ ) doesn't include support for the nocookie host. I saw the changes to demo/App.js committed with 1.9.0. Is the demo url just not using the latest code? I'm asking because I've not been able to get the new 'embedOptions' config to work and wanted to see a working version. |
@hansmodo the new solution doesn't have a top level prop for the embed Option, I assume that's why there isn't an option in the demo app… But I've tested it, it works |
Doesnt work for me |
Closes cookpete/react-player#557 Allows the use of the `host` option, which fixes cookpete/react-player#272
Closes cookpete/react-player#557 Allows the use of the `host` option, which fixes cookpete/react-player#272
Fixes cookpete/react-player#896 Thoroughly fixes cookpete/react-player#272 Thoroughly fixes cookpete/react-player#557
As mentioned in https://axbom.com/embed-youtube-videos-without-cookies/ the no-cookie mode still save a local storage to store a device id and track you none the less which, without consent, anti gdpr. |
Closes cookpete/react-player#557 Allows the use of the `host` option, which fixes cookpete/react-player#272
Fixes cookpete/react-player#896 Thoroughly fixes cookpete/react-player#272 Thoroughly fixes cookpete/react-player#557
Closes cookpete/react-player#557 Allows the use of the `host` option, which fixes cookpete/react-player#272
Fixes cookpete/react-player#896 Thoroughly fixes cookpete/react-player#272 Thoroughly fixes cookpete/react-player#557
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:
That would convert
https://www.youtube.com/watch?v=dQw4w9WgXcQ
tohttps://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
The text was updated successfully, but these errors were encountered: