From 6f0c9840bed78c07d7fb602c413bd67e6667fce2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 26 May 2020 20:28:18 -0500 Subject: [PATCH] Fall back on auto video height if not given, fixes #91 --- app/gabsocial/features/video/index.js | 4 ++-- app/styles/gabsocial/components.scss | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/gabsocial/features/video/index.js b/app/gabsocial/features/video/index.js index 3e75469b3..0e3be6049 100644 --- a/app/gabsocial/features/video/index.js +++ b/app/gabsocial/features/video/index.js @@ -410,7 +410,7 @@ class Video extends React.PureComponent { height = Math.floor(containerWidth / aspectRatio); } - playerStyle.height = height; + if (height) playerStyle.height = height; } let warning; @@ -445,7 +445,7 @@ class Video extends React.PureComponent { aria-label={alt} title={alt} width={width} - height={height} + height={height || null} volume={volume} onClick={this.togglePlay} onPlay={this.handlePlay} diff --git a/app/styles/gabsocial/components.scss b/app/styles/gabsocial/components.scss index 57f6d6267..4a963bf7c 100644 --- a/app/styles/gabsocial/components.scss +++ b/app/styles/gabsocial/components.scss @@ -3628,6 +3628,8 @@ a.status-card.compact:hover { video { max-width: 100vw; max-height: 80vh; + min-height: 120px; + object-fit: contain; z-index: 1; }