-
-
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
Changes to width and height props are ignored #84
Comments
Good spot. This should be an easy fix. |
I'm having a similar issue. The width is not adjustable. Please let me know if there's something I'm missing. Thanks. |
Should be fixed in |
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
philip-luther
added a commit
to philip-luther/react-player
that referenced
this issue
Nov 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: