|
|
|
@ -1,12 +1,10 @@ |
|
|
|
|
|
|
|
import { isIOS, isMobileDevice } from 'config/userAgent' |
|
|
|
|
|
|
|
|
|
|
|
import { Loader } from 'features/Loader' |
|
|
|
import { Loader } from 'features/Loader' |
|
|
|
import { VideoPlayer } from 'features/VideoPlayer' |
|
|
|
import { VideoPlayer } from 'features/VideoPlayer' |
|
|
|
import { useMatchPageStore } from 'features/MatchPage/store' |
|
|
|
import { useMatchPageStore } from 'features/MatchPage/store' |
|
|
|
import { Name } from 'features/Name' |
|
|
|
import { Name } from 'features/Name' |
|
|
|
|
|
|
|
|
|
|
|
import { WaterMark } from 'components/WaterMark' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { REWIND_SECONDS } from './config' |
|
|
|
import { REWIND_SECONDS } from './config' |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
import { |
|
|
|
@ -18,10 +16,11 @@ import { |
|
|
|
Forward, |
|
|
|
Forward, |
|
|
|
ControlsGradient, |
|
|
|
ControlsGradient, |
|
|
|
TeamsDetailsWrapper, |
|
|
|
TeamsDetailsWrapper, |
|
|
|
|
|
|
|
WarningIosText, |
|
|
|
|
|
|
|
WarningIosWrapper, |
|
|
|
} from './styled' |
|
|
|
} from './styled' |
|
|
|
import type { Props } from './hooks' |
|
|
|
import type { Props } from './hooks' |
|
|
|
import { useVideoPlayer } from './hooks' |
|
|
|
import { useVideoPlayer } from './hooks' |
|
|
|
import { useAuthStore } from '../AuthStore' |
|
|
|
|
|
|
|
import { Controls } from './components/Controls' |
|
|
|
import { Controls } from './components/Controls' |
|
|
|
import RewindMobile from './components/RewindMobile' |
|
|
|
import RewindMobile from './components/RewindMobile' |
|
|
|
|
|
|
|
|
|
|
|
@ -30,7 +29,6 @@ import RewindMobile from './components/RewindMobile' |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export const StreamPlayer = (props: Props) => { |
|
|
|
export const StreamPlayer = (props: Props) => { |
|
|
|
const { profile } = useMatchPageStore() |
|
|
|
const { profile } = useMatchPageStore() |
|
|
|
const { user } = useAuthStore() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
|
activeChapterIndex, |
|
|
|
activeChapterIndex, |
|
|
|
@ -78,6 +76,7 @@ export const StreamPlayer = (props: Props) => { |
|
|
|
videoRef, |
|
|
|
videoRef, |
|
|
|
volume, |
|
|
|
volume, |
|
|
|
volumeInPercent, |
|
|
|
volumeInPercent, |
|
|
|
|
|
|
|
warningText, |
|
|
|
wrapperRef, |
|
|
|
wrapperRef, |
|
|
|
} = useVideoPlayer(props) |
|
|
|
} = useVideoPlayer(props) |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
@ -94,11 +93,19 @@ export const StreamPlayer = (props: Props) => { |
|
|
|
<LoaderWrapper buffering={buffering}> |
|
|
|
<LoaderWrapper buffering={buffering}> |
|
|
|
<Loader color='#515151' /> |
|
|
|
<Loader color='#515151' /> |
|
|
|
</LoaderWrapper> |
|
|
|
</LoaderWrapper> |
|
|
|
{(profile?.tournament.id === 1136 || profile?.tournament.id === 131) |
|
|
|
{isIOS |
|
|
|
&& playing |
|
|
|
? ( |
|
|
|
&& ( |
|
|
|
<WarningIosWrapper> |
|
|
|
<WaterMark value={user?.profile?.sub} /> |
|
|
|
<WarningIosText> |
|
|
|
)} |
|
|
|
{warningText} |
|
|
|
|
|
|
|
</WarningIosText> |
|
|
|
|
|
|
|
</WarningIosWrapper> |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
: ( |
|
|
|
|
|
|
|
<LoaderWrapper buffering={buffering}> |
|
|
|
|
|
|
|
<Loader color='#515151' /> |
|
|
|
|
|
|
|
</LoaderWrapper> |
|
|
|
|
|
|
|
)} |
|
|
|
<VideoPlayer |
|
|
|
<VideoPlayer |
|
|
|
width='100%' |
|
|
|
width='100%' |
|
|
|
height='100%' |
|
|
|
height='100%' |
|
|
|
|