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 progress = scrubberActive ? seekPosition : currentTime
const progressPercent = (progress / duration) * 100 const progressPercent = (progress / duration) * 100
if (duration < 3) return null
return ( return (
<View <View
testID="scrubber" testID="scrubber"
@@ -373,6 +373,7 @@ export function Controls({
onPress={onPressPlayPause} onPress={onPressPlayPause}
/> />
<View style={a.flex_1} /> <View style={a.flex_1} />
{Math.round(duration) > 0 && (
<Text <Text
style={[ style={[
a.px_xs, a.px_xs,
@@ -380,6 +381,7 @@ export function Controls({
]}> ]}>
{formatTime(currentTime)} / {formatTime(duration)} {formatTime(currentTime)} / {formatTime(duration)}
</Text> </Text>
)}
{hasSubtitleTrack && ( {hasSubtitleTrack && (
<ControlButton <ControlButton
active={subtitlesEnabled} active={subtitlesEnabled}