Update rnvideo web handling

This commit is contained in:
Zoe Roux 2024-08-12 09:25:44 +02:00
parent 660175f4ed
commit 2f835acd2d
No known key found for this signature in database

View File

@ -246,8 +246,8 @@ const Video = forwardRef<{ seek: (value: number) => void }, VideoProps>(function
onLoadedMetadata={() => { onLoadedMetadata={() => {
if (source.startPosition) setProgress(source.startPosition / 1000); if (source.startPosition) setProgress(source.startPosition / 1000);
}} }}
onPlay={() => onPlaybackStateChanged?.({ isPlaying: true })} onPlay={() => onPlaybackStateChanged?.({ isPlaying: true, isSeeking: false })}
onPause={() => onPlaybackStateChanged?.({ isPlaying: false })} onPause={() => onPlaybackStateChanged?.({ isPlaying: false, isSeeking: false })}
onEnded={onEnd} onEnded={onEnd}
{...css({ width: "100%", height: "100%", objectFit: "contain" })} {...css({ width: "100%", height: "100%", objectFit: "contain" })}
/> />