Merge remote-tracking branch 'origin/master' into emojireacts

This commit is contained in:
Alex Gleason 2020-05-20 19:20:47 -05:00
commit 9ea36ab913
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 17 additions and 15 deletions

View File

@ -374,8 +374,21 @@ class Video extends React.PureComponent {
this.props.onCloseVideo(); this.props.onCloseVideo();
} }
getPreload = () => {
const { startTime, detailed } = this.props;
const { dragging, fullscreen } = this.state;
if (startTime || fullscreen || dragging) {
return 'auto';
} else if (detailed) {
return 'metadata';
} else {
return 'none';
}
}
render() { render() {
const { preview, src, inline, startTime, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive, link, aspectRatio } = this.props; const { preview, src, inline, onOpenVideo, onCloseVideo, intl, alt, detailed, sensitive, link, aspectRatio } = this.props;
const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state; const { containerWidth, currentTime, duration, volume, buffer, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;
const progress = (currentTime / duration) * 100; const progress = (currentTime / duration) * 100;
@ -400,16 +413,6 @@ class Video extends React.PureComponent {
playerStyle.height = height; playerStyle.height = height;
} }
let preload;
if (startTime || fullscreen || dragging) {
preload = 'auto';
} else if (detailed) {
preload = 'metadata';
} else {
preload = 'none';
}
let warning; let warning;
if (sensitive) { if (sensitive) {
@ -435,7 +438,7 @@ class Video extends React.PureComponent {
ref={this.setVideoRef} ref={this.setVideoRef}
src={src} src={src}
poster={preview} poster={preview}
preload={preload} // preload={this.getPreload()}
loop loop
role='button' role='button'
tabIndex='0' tabIndex='0'

View File

@ -1,11 +1,10 @@
.sidebar-menu { .sidebar-menu {
display: flex; display: flex;
position: fixed; position: absolute;
flex-direction: column; flex-direction: column;
width: 275px; width: 275px;
height: 100vh; height: auto;
top: 0; top: 0;
bottom: 0;
left: 0; left: 0;
background-color: #fff; background-color: #fff;
transform: translateX(-275px); transform: translateX(-275px);