Skip to content

Changes to width and height props are ignored #84

Description

@claus

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions