diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-10-20 19:47:10 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-10-21 16:09:07 +0200 |
commit | 04bedd237bf2ec1cd5538ee2da4c60c932a66ae0 (patch) | |
tree | dfe72fda9228517308f4ca9335adb971d1a32906 /app | |
parent | dfa5b0576f4f212153a3da7ef53d4c58b53ed4c2 (diff) |
Attempt at fixing inline video player
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/flavours/glitch/features/video/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 227f298e4..4f95aea96 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -220,6 +220,11 @@ export default class Video extends React.PureComponent { } componentDidUpdate (prevProps) { + if (this.player && this.player.offsetWidth && !this.state.fullscreen) { + this.setState({ + containerWidth: this.player.offsetWidth, + }); + } if (this.video && this.state.revealed && this.props.preventPlayback && !prevProps.preventPlayback) { this.video.pause(); } |