Ott 336 hide not used player controls (#109)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 5 years ago committed by GitHub
parent 2f5365dceb
commit 82e71d880a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/features/Matches/hooks.tsx
  2. 6
      src/features/VideoPlayer/index.tsx
  3. 1
      src/features/VideoPlayer/styled.tsx
  4. 2
      src/requests/getMatches.tsx

@ -7,8 +7,8 @@ import fpMap from 'lodash/fp/map'
import fpOrderBy from 'lodash/fp/orderBy'
import type { Matches, Content } from 'requests'
import { SPORT_NAMES } from 'config'
import { getProfileLogo } from 'helpers'
import { ProfileTypes } from 'config'
import { getProfileLogo, getSportLexic } from 'helpers'
import { useLexicsStore } from 'features/LexicsStore'
export type Props = {
@ -48,19 +48,19 @@ const prepareMatches = (content: Array<Content>, suffix: string) => pipe(
date,
id,
preview: '/images/preview.png',
sportName: SPORT_NAMES[sport],
sportName: getSportLexic(sport),
sportType: sport,
streamStatus: stream_status,
team1Logo: getProfileLogo({
id: team1.id,
profileType: 2,
profileType: ProfileTypes.TEAMS,
sportType: sport,
}),
team1Name: team1[`name_${suffix}` as Name],
team1Score: team1.score,
team2Logo: getProfileLogo({
id: team2.id,
profileType: 2,
profileType: ProfileTypes.TEAMS,
sportType: sport,
}),
team2Name: team2[`name_${suffix}` as Name],

@ -8,11 +8,8 @@ import {
PlayerWrapper,
ReactPlayer,
Controls,
Prev,
Next,
PlayStop,
Fullscreen,
Settings,
} from './styled'
type Props = {
@ -64,9 +61,7 @@ export const VideoPlayer = ({ url }: Props) => {
onReady={startPlaying}
/>
<Controls>
<Prev />
<PlayStop onClick={togglePlaying} playing={playing} />
<Next />
<VolumeBar
value={volumeInPercent}
muted={muted}
@ -80,7 +75,6 @@ export const VideoPlayer = ({ url }: Props) => {
loadedProgress={loadedProgress}
/>
<Fullscreen onClick={onFullscreenClick} isFullscreen={isFullscreen} />
<Settings />
</Controls>
</PlayerWrapper>
)

@ -91,7 +91,6 @@ export const Fullscreen = styled(ButtonBase)<FullscreenProps>`
width: 22px;
height: 20px;
margin-left: 31px;
margin-right: 23px;
background-image: ${({ isFullscreen }) => (
isFullscreen
? 'url(/images/player-fullscreen-off.svg)'

@ -30,7 +30,7 @@ export type Content = {
matches: Array<Match>,
name_eng: string,
name_rus: string,
sport: 1 | 2 | 3,
sport: SportTypes,
}
export type Match = {

Loading…
Cancel
Save