|
|
|
@ -2,6 +2,8 @@ import { useSlider } from 'features/StreamPlayer/hooks/useSlider' |
|
|
|
import { TimeTooltip } from 'features/StreamPlayer/components/TimeTooltip' |
|
|
|
import { TimeTooltip } from 'features/StreamPlayer/components/TimeTooltip' |
|
|
|
import { Scrubber, ScrubberContainer } from 'features/StreamPlayer/components/ProgressBar/styled' |
|
|
|
import { Scrubber, ScrubberContainer } from 'features/StreamPlayer/components/ProgressBar/styled' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { isIOS } from 'config/userAgent' |
|
|
|
|
|
|
|
|
|
|
|
import { Chapters } from '../Chapters' |
|
|
|
import { Chapters } from '../Chapters' |
|
|
|
import type { Props } from './hooks' |
|
|
|
import type { Props } from './hooks' |
|
|
|
import { useProgressBar } from './hooks' |
|
|
|
import { useProgressBar } from './hooks' |
|
|
|
@ -16,11 +18,17 @@ export const ProgressBar = (props: Props) => { |
|
|
|
time, |
|
|
|
time, |
|
|
|
} = useProgressBar(props) |
|
|
|
} = useProgressBar(props) |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<ProgressBarList ref={progressBarRef}> |
|
|
|
<ProgressBarList |
|
|
|
|
|
|
|
ref={progressBarRef} |
|
|
|
|
|
|
|
isIOS={isIOS} |
|
|
|
|
|
|
|
> |
|
|
|
<Chapters chapters={calculatedChapters} /> |
|
|
|
<Chapters chapters={calculatedChapters} /> |
|
|
|
{isScrubberVisible && ( |
|
|
|
{isScrubberVisible && ( |
|
|
|
<ScrubberContainer> |
|
|
|
<ScrubberContainer> |
|
|
|
<Scrubber style={{ left: `${playedProgressInPercent}%` }}> |
|
|
|
<Scrubber |
|
|
|
|
|
|
|
isIOS={isIOS} |
|
|
|
|
|
|
|
style={{ left: `${playedProgressInPercent}%` }} |
|
|
|
|
|
|
|
> |
|
|
|
<TimeTooltip time={time} /> |
|
|
|
<TimeTooltip time={time} /> |
|
|
|
</Scrubber> |
|
|
|
</Scrubber> |
|
|
|
</ScrubberContainer> |
|
|
|
</ScrubberContainer> |
|
|
|
|