mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 20:39:35 +00:00
Fix video thumbnail fallback
This commit is contained in:
@@ -45,10 +45,14 @@ const VideoListItem = ({
|
||||
>
|
||||
<div className={`video-thumb-wrap ${viewLayout}`}>
|
||||
<div className="video-thumb">
|
||||
<picture>
|
||||
<img src={`${getApiUrl()}${video.vid_thumb_url}`} alt="video-thumb" />
|
||||
<source srcSet={defaultVideoThumb} />
|
||||
</picture>
|
||||
<img
|
||||
src={`${getApiUrl()}${video.vid_thumb_url}`}
|
||||
alt="video-thumb"
|
||||
onError={({ currentTarget }) => {
|
||||
currentTarget.onerror = null; // prevents looping
|
||||
currentTarget.src = defaultVideoThumb;
|
||||
}}
|
||||
/>
|
||||
|
||||
{video.player.progress && (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user