Skip to content
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 controlsList attribute missing #232

Closed
jaqua opened this issue Sep 11, 2017 · 2 comments
Closed

Support for controlsList attribute missing #232

jaqua opened this issue Sep 11, 2017 · 2 comments

Comments

@jaqua
Copy link

jaqua commented Sep 11, 2017

As I would like to prevent showing the download icon in the player, I need to add controlsList='nodownload' attribute to <video> element. As far as I can see, there is no support for this right now...

@cookpete
Copy link
Owner

You can use the config prop to add additional attributes to the file player:

<ReactPlayer
  url='http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'
  controls
  config={{ file: { attributes: { controlsList: 'nodownload' }}}}
/>

However, controlsList is currently stripped by React and so this will only work when facebook/react#9594 lands, which apparently will be in 15.6.2. Until then this will not work, and there is a console warning:

Warning: Unknown prop controlsList on <video> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop

@JenniferFuBook
Copy link

JenniferFuBook commented May 15, 2020

Thanks, Pete!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants