Fix safari issue

This commit is contained in:
Zoe Roux 2023-09-12 18:03:56 +02:00
parent ec2b0e0f78
commit 385c580358
No known key found for this signature in database
2 changed files with 7 additions and 5 deletions

View File

@ -132,8 +132,8 @@ const ProgressText = () => {
};
const toTimerString = (timer?: number, duration?: number) => {
if (timer === undefined) return "??:??";
if (!duration) duration = timer;
if (timer === undefined || duration === undefined || isNaN(duration) || isNaN(timer)) return "??:??";
if (duration >= 3600) return new Date(timer * 1000).toISOString().substring(11, 19);
return new Date(timer * 1000).toISOString().substring(14, 19);
};

View File

@ -185,6 +185,8 @@ const Video = forwardRef<{ seek: (value: number) => void }, VideoProps>(function
src={source.uri}
muted={muted}
autoPlay={!paused}
controls={false}
playsInline
onCanPlay={() => onBuffer?.call(null, { isBuffering: false })}
onWaiting={() => onBuffer?.call(null, { isBuffering: true })}
onDurationChange={() => {