about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-10-20 19:47:10 +0200
committerThibG <thib@sitedethib.com>2018-10-21 16:09:07 +0200
commit04bedd237bf2ec1cd5538ee2da4c60c932a66ae0 (patch)
treedfe72fda9228517308f4ca9335adb971d1a32906
parentdfa5b0576f4f212153a3da7ef53d4c58b53ed4c2 (diff)
Attempt at fixing inline video player
-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();
     }