hide web scrubber in certain situations
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user