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) {
attr.onClick = this.onVideoPreview;
attr.loading = 'lazy';
} else {
attr.src = null;
}
el = InlineVideo;
} else {
+5 -4
View File
@@ -27,11 +27,12 @@ export default class InlineVideo extends React.PureComponent {
return (
<div className={className}>
{React.createElement('img', this.props)}
<div className="play-control">
{this.props.onClick ?
<div className="play-control">
<i className="material-icons white bigger">play_arrow</i>
</div>
: null}
<i className="material-icons white bigger">play_arrow</i>
:
<img src="img/broken_video.png" width="36" height="36" />}
</div>
{duration ? <div className="duration">{duration}</div> : null}
</div>
);