fix display of broken videos
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
@@ -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)}
|
||||||
{this.props.onClick ?
|
|
||||||
<div className="play-control">
|
<div className="play-control">
|
||||||
|
{this.props.onClick ?
|
||||||
<i className="material-icons white bigger">play_arrow</i>
|
<i className="material-icons white bigger">play_arrow</i>
|
||||||
|
:
|
||||||
|
<img src="img/broken_video.png" width="36" height="36" />}
|
||||||
</div>
|
</div>
|
||||||
: null}
|
|
||||||
{duration ? <div className="duration">{duration}</div> : null}
|
{duration ? <div className="duration">{duration}</div> : null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user