Merge branch 'poster' into 'main'

Add back video poster

See merge request soapbox-pub/soapbox!3342
merge-requests/3343/head
Alex Gleason 2025-02-28 16:44:06 +00:00
commit 6f020a854e
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -251,8 +251,8 @@ const Upload: React.FC<IUpload> = ({
<div className='absolute inset-0 z-[-1] size-full'>
{mediaType === 'video' && (
<video className='size-full object-cover' autoPlay playsInline muted loop>
<source src={media.preview_url} />
<video className='size-full object-cover' poster={media.preview_url} autoPlay playsInline muted loop>
<source src={media.url} />
</video>
)}
{uploadIcon}

Wyświetl plik

@ -133,6 +133,7 @@ const Video: React.FC<IVideo> = ({
aspectRatio = 16 / 9,
link,
blurhash,
preview,
}) => {
const intl = useIntl();
const isMobile = useIsMobile();
@ -571,6 +572,7 @@ const Video: React.FC<IVideo> = ({
onProgress={handleProgress}
onVolumeChange={handleVolumeChange}
muted={muted}
poster={preview}
/>
<div