fix display of broken videos

This commit is contained in:
or-else
2023-02-06 09:56:50 -08:00
parent 7e3b2fc254
commit 7b44913724
2 changed files with 5 additions and 6 deletions
-2
View File
@@ -236,8 +236,6 @@ function handleVideoData(el, data, attr) {
if (data.ref || data.val) { if (data.ref || data.val) {
attr.onClick = this.onVideoPreview; attr.onClick = this.onVideoPreview;
attr.loading = 'lazy'; attr.loading = 'lazy';
} else {
attr.src = null;
} }
el = InlineVideo; el = InlineVideo;
} else { } else {
+5 -4
View File
@@ -27,11 +27,12 @@ export default class InlineVideo extends React.PureComponent {
return ( return (
<div className={className}> <div className={className}>
{React.createElement('img', this.props)} {React.createElement('img', this.props)}
<div className="play-control">
{this.props.onClick ? {this.props.onClick ?
<div className="play-control"> <i className="material-icons white bigger">play_arrow</i>
<i className="material-icons white bigger">play_arrow</i> :
</div> <img src="img/broken_video.png" width="36" height="36" />}
: null} </div>
{duration ? <div className="duration">{duration}</div> : null} {duration ? <div className="duration">{duration}</div> : null}
</div> </div>
); );