about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/video
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/features/video')
-rw-r--r--app/javascript/flavours/glitch/features/video/index.js5
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();
     }