|
|
|
|
@ -1,22 +1,29 @@ |
|
|
|
|
import styled, { css } from 'styled-components/macro' |
|
|
|
|
import styled, { css } from 'styled-components' |
|
|
|
|
|
|
|
|
|
import { isMobileDevice } from 'config/userAgent' |
|
|
|
|
import { devices } from 'config' |
|
|
|
|
|
|
|
|
|
export const ControlsGradient = styled.div` |
|
|
|
|
export const ControlsGradient = styled.div<{ isVisible?: boolean }>` |
|
|
|
|
background-image: url(/images/player-controls-gradient.png); |
|
|
|
|
bottom: 0; |
|
|
|
|
position: absolute; |
|
|
|
|
width: 100%; |
|
|
|
|
pointer-events: none; |
|
|
|
|
height: 145px; |
|
|
|
|
|
|
|
|
|
${({ isVisible }) => (isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
height: 100%; |
|
|
|
|
background: ${(isVisible |
|
|
|
|
? 'linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(255,255,255,0) 25%, rgba(255,255,255,0) 75%, rgba(0,0,0,0.7) 100%)' |
|
|
|
|
: 'initial')} |
|
|
|
|
` : '')}
|
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
type HoverStylesProps = { |
|
|
|
|
visible: boolean, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const hoverStyles = css<HoverStylesProps>` |
|
|
|
|
export const hoverStyles = css<HoverStylesProps>` |
|
|
|
|
transition: opacity 0.3s ease-in-out; |
|
|
|
|
${({ visible }) => (visible |
|
|
|
|
? css`opacity: 1;` |
|
|
|
|
@ -113,9 +120,12 @@ export const PlayerWrapper = styled.div<PlayStopProps>` |
|
|
|
|
padding-top: 56.25%; |
|
|
|
|
`}
|
|
|
|
|
|
|
|
|
|
${devices.laptop} { |
|
|
|
|
min-height: auto; |
|
|
|
|
} |
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
min-height: auto; |
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
` |
|
|
|
|
: ''}; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
type LoaderWrapperProps = { |
|
|
|
|
@ -151,7 +161,7 @@ export const ButtonBase = styled.button` |
|
|
|
|
|
|
|
|
|
const sizes = { |
|
|
|
|
lg: 92, |
|
|
|
|
sm: 24, |
|
|
|
|
sm: 29, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type PlayStopProps = { |
|
|
|
|
@ -176,8 +186,8 @@ export const PlayStop = styled(ButtonBase)<PlayStopProps>` |
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
width: 20%; |
|
|
|
|
height: 60%; |
|
|
|
|
width: ${sizes.sm}px; |
|
|
|
|
height: ${sizes.sm}px; |
|
|
|
|
margin-right: 0; |
|
|
|
|
padding: 0; |
|
|
|
|
` |
|
|
|
|
@ -248,15 +258,17 @@ export const Backward = styled(ButtonBase)<ButtonProps>` |
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
width: 15%; |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin-right: 6px; |
|
|
|
|
width: ${rewindButtonSizes.sides.sm}px; |
|
|
|
|
height: ${rewindButtonSizes.sides.sm}px; |
|
|
|
|
font-size: ${rewindButtonSizes.fontSizes.sm}px; |
|
|
|
|
` |
|
|
|
|
: ''}; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
export const Forward = styled(Backward)` |
|
|
|
|
background-image: url(/images/player-forward.svg); |
|
|
|
|
margin-left: 10px; |
|
|
|
|
margin-right: 0; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
type PlaybackTimeProps = { |
|
|
|
|
@ -299,7 +311,7 @@ export const CenterControls = styled.div<CenterControlsProps>` |
|
|
|
|
pointer-events: ${({ playing }) => (playing ? 'none' : 'auto')}; |
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
width: 70%; |
|
|
|
|
width: 135px; |
|
|
|
|
` |
|
|
|
|
: ''}; |
|
|
|
|
` |
|
|
|
|
@ -314,11 +326,15 @@ export const LiveBtn = styled(ButtonBase)` |
|
|
|
|
padding: 4.5px 8px; |
|
|
|
|
background-color: #CC0000; |
|
|
|
|
border-radius: 1.3px; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
${isMobileDevice |
|
|
|
|
? css` |
|
|
|
|
` |
|
|
|
|
: ''}; |
|
|
|
|
export const TeamsDetailsWrapper = styled.div` |
|
|
|
|
position: absolute; |
|
|
|
|
top: 20px; |
|
|
|
|
left: 15px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
z-index: 50; |
|
|
|
|
` |
|
|
|
|
|
|
|
|
|
export const ChaptersText = styled.span` |
|
|
|
|
|