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'>
|
<div className='absolute inset-0 z-[-1] size-full'>
|
||||||
{mediaType === 'video' && (
|
{mediaType === 'video' && (
|
||||||
<video className='size-full object-cover' autoPlay playsInline muted loop>
|
<video className='size-full object-cover' poster={media.preview_url} autoPlay playsInline muted loop>
|
||||||
<source src={media.preview_url} />
|
<source src={media.url} />
|
||||||
</video>
|
</video>
|
||||||
)}
|
)}
|
||||||
{uploadIcon}
|
{uploadIcon}
|
||||||
|
|
|
@ -133,6 +133,7 @@ const Video: React.FC<IVideo> = ({
|
||||||
aspectRatio = 16 / 9,
|
aspectRatio = 16 / 9,
|
||||||
link,
|
link,
|
||||||
blurhash,
|
blurhash,
|
||||||
|
preview,
|
||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
|
@ -571,6 +572,7 @@ const Video: React.FC<IVideo> = ({
|
||||||
onProgress={handleProgress}
|
onProgress={handleProgress}
|
||||||
onVolumeChange={handleVolumeChange}
|
onVolumeChange={handleVolumeChange}
|
||||||
muted={muted}
|
muted={muted}
|
||||||
|
poster={preview}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
Ładowanie…
Reference in New Issue