fix for a couple of minor problems

This commit is contained in:
or-else
2022-12-20 18:34:20 -08:00
parent 261b2dbdd7
commit 4489646144
8 changed files with 10 additions and 5 deletions
+1
View File
@@ -2075,6 +2075,7 @@ img.image-preview::before {
height: 4rem; height: 4rem;
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
border-radius: 50%; border-radius: 50%;
pointer-events: none;
cursor: pointer; cursor: pointer;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -31,7 +31,7 @@ export default class InlineVideo extends React.PureComponent {
<div className="play-control"> <div className="play-control">
<i className="material-icons white bigger">play_arrow</i> <i className="material-icons white bigger">play_arrow</i>
</div> </div>
: null} : null}
{duration ? <div className="duration">{duration}</div> : null} {duration ? <div className="duration">{duration}</div> : null}
</div> </div>
); );
+2
View File
@@ -44,6 +44,7 @@ export default class VideoPreview extends React.PureComponent {
const height = this.props.content.height || '-'; const height = this.props.content.height || '-';
const controlist = this.props.onSendMessage ? 'nodownload' : ''; const controlist = this.props.onSendMessage ? 'nodownload' : '';
const autoPlay = !this.props.onSendMessage;
return ( return (
<div id="image-preview"> <div id="image-preview">
@@ -56,6 +57,7 @@ export default class VideoPreview extends React.PureComponent {
className="image-preview" className="image-preview"
controls controlist={controlist} controls controlist={controlist}
disablePictureInPicture ref={this.videoRef} disablePictureInPicture ref={this.videoRef}
autoPlay={autoPlay}
src={this.props.tinode.authorizeURL(this.props.content.url)} src={this.props.tinode.authorizeURL(this.props.content.url)}
poster={this.props.content.preview} poster={this.props.content.preview}
alt={this.props.content.filename} /> alt={this.props.content.filename} />
+2
View File
@@ -16500,6 +16500,7 @@ class VideoPreview extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCom
const width = this.props.content.width || '-'; const width = this.props.content.width || '-';
const height = this.props.content.height || '-'; const height = this.props.content.height || '-';
const controlist = this.props.onSendMessage ? 'nodownload' : ''; const controlist = this.props.onSendMessage ? 'nodownload' : '';
const autoPlay = !this.props.onSendMessage;
return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
id: "image-preview" id: "image-preview"
}, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { }, react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
@@ -16520,6 +16521,7 @@ class VideoPreview extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCom
controlist: controlist, controlist: controlist,
disablePictureInPicture: true, disablePictureInPicture: true,
ref: this.videoRef, ref: this.videoRef,
autoPlay: autoPlay,
src: this.props.tinode.authorizeURL(this.props.content.url), src: this.props.tinode.authorizeURL(this.props.content.url),
poster: this.props.content.preview, poster: this.props.content.preview,
alt: this.props.content.filename alt: this.props.content.filename
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long