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(); }