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

Changes to width and height props are ignored #84

Closed
claus opened this issue Jul 22, 2016 · 3 comments
Closed

Changes to width and height props are ignored #84

claus opened this issue Jul 22, 2016 · 3 comments

Comments

@claus
Copy link

claus commented Jul 22, 2016

Is there any reason why changing the width and height props are not triggering a render?

I am working on an app that uses react-player in an overlay that spans the entire viewport, where the react-player component is supposed to adjust to viewport size when the browser window is resized. After setting the initial values for width/height, later changes are ignored due to the implementation of ReactPlayer.shouldComponentUpdate(). To work around that, i have to call this.refs.reactPlayer.forceUpdate(), which works just fine. It would be much nicer to just test width/height in ReactPlayer.shouldComponentUpdate(), in addition to url/playing/volume.

https://github.com/CookPete/react-player/blob/master/src/ReactPlayer.js#L20-L26

@cookpete
Copy link
Owner

Good spot. This should be an easy fix.

@sarjford
Copy link

I'm having a similar issue. The width is not adjustable. Please let me know if there's something I'm missing. Thanks.

@cookpete
Copy link
Owner

Should be fixed in 0.7.5

david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue Dec 23, 2018
david-hub024 pushed a commit to david-hub024/React_VideoPlayer that referenced this issue May 23, 2020
albanqoku added a commit to albanqoku/react-player that referenced this issue Feb 24, 2021
Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
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