kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Merge branch 'poster' into 'main'
Add back video poster See merge request soapbox-pub/soapbox!3342merge-requests/3343/head
commit
6f020a854e
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue