sforkowany z mirror/soapbox
Fall back on auto video height if not given, fixes #91
rodzic
6f76e1796b
commit
6f0c9840be
|
@ -410,7 +410,7 @@ class Video extends React.PureComponent {
|
||||||
height = Math.floor(containerWidth / aspectRatio);
|
height = Math.floor(containerWidth / aspectRatio);
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStyle.height = height;
|
if (height) playerStyle.height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
let warning;
|
let warning;
|
||||||
|
@ -445,7 +445,7 @@ class Video extends React.PureComponent {
|
||||||
aria-label={alt}
|
aria-label={alt}
|
||||||
title={alt}
|
title={alt}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height || null}
|
||||||
volume={volume}
|
volume={volume}
|
||||||
onClick={this.togglePlay}
|
onClick={this.togglePlay}
|
||||||
onPlay={this.handlePlay}
|
onPlay={this.handlePlay}
|
||||||
|
|
|
@ -3628,6 +3628,8 @@ a.status-card.compact:hover {
|
||||||
video {
|
video {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
|
min-height: 120px;
|
||||||
|
object-fit: contain;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue