import { Loader } from 'features/Loader' import { PlayerWrapper, CenterControls, PlayStop, LoaderWrapper, Backward, Forward, ControlsGradient, TeamsDetailsWrapper, } from 'features/StreamPlayer/styled' import { VideoPlayer } from 'features/VideoPlayer' import { Controls } from 'features/StreamPlayer/components/Controls' import { Name } from 'features/Name' import RewindMobile from 'features/StreamPlayer/components/RewindMobile' import { FiltersPopup } from 'features/MatchSidePlaylists/components/FiltersPopup' import { useAuthStore } from 'features/AuthStore' import { isMobileDevice } from 'config/userAgent' import { AccessTimer } from 'components/AccessTimer' import type { Props } from './hooks' import { useMultiSourcePlayer } from './hooks' import { Players } from './types' import { REWIND_SECONDS } from './config' export const MultiSourcePlayer = (props: Props) => { const { access, isOpenPopup, profile, } = props const { activeChapterIndex, activePlayer, activeSrc, allPlayedProgress, centerControlsVisible, chapters, duration, hideCenterControls, isFirstChapterPlaying, isFullscreen, isLastChapterPlaying, loadedProgress, mainControlsVisible, muted, nextSrc, numberOfChapters, onEnded, onError, onFullscreenClick, onLoadedProgress, onMouseEnter, onMouseLeave, onMouseMove, onPause, onPlayedProgress, onPlayerClick, onProgressChange, onQualitySelect, onReady, onTouchEnd, onTouchStart, onVolumeChange, onVolumeClick, playedProgress, playing, playNextChapter, playPrevChapter, ready, rewindBackward, rewindForward, seek, selectedQuality, showCenterControls, togglePlaying, video1Ref, video2Ref, videoQualities, volume, volumeInPercent, wrapperRef, } = useMultiSourcePlayer(props) const firstPlayerActive = activePlayer === Players.PLAYER1 const currentVideo = firstPlayerActive ? video1Ref : video2Ref const { user } = useAuthStore() return ( { !ready && ( ) } {isOpenPopup && } ) }