hide web scrubber in certain situations

This commit is contained in:
Samuel Newman
2025-08-14 12:13:32 +03:00
parent 2c20519d19
commit 1a3fbbc057
2 changed files with 11 additions and 7 deletions
@@ -146,6 +146,8 @@ export function Scrubber({
const progress = scrubberActive ? seekPosition : currentTime
const progressPercent = (progress / duration) * 100
if (duration < 3) return null
return (
<View
testID="scrubber"
@@ -373,13 +373,15 @@ export function Controls({
onPress={onPressPlayPause}
/>
<View style={a.flex_1} />
<Text
style={[
a.px_xs,
{color: t.palette.white, fontVariant: ['tabular-nums']},
]}>
{formatTime(currentTime)} / {formatTime(duration)}
</Text>
{Math.round(duration) > 0 && (
<Text
style={[
a.px_xs,
{color: t.palette.white, fontVariant: ['tabular-nums']},
]}>
{formatTime(currentTime)} / {formatTime(duration)}
</Text>
)}
{hasSubtitleTrack && (
<ControlButton
active={subtitlesEnabled}