File tree Expand file tree Collapse file tree
dotcom-rendering/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import { Caption } from './Caption';
3131import { CardPicture , type Props as CardPictureProps } from './CardPicture' ;
3232import { useConfig } from './ConfigContext' ;
3333import type {
34+ ControlsPosition ,
3435 PLAYER_STATES ,
3536 PlayerStates ,
3637 SubtitleSize ,
@@ -297,7 +298,7 @@ type Props = {
297298 /**
298299 * The position of subtitles and the audio icon.
299300 */
300- controlsPosition ?: 'top' | 'bottom' ;
301+ controlsPosition ?: ControlsPosition ;
301302 /**
302303 * The minimum/maximum aspect ratio the video will have. The video will be cropped if this
303304 * value is defined and the video aspect ratio is less/greater than this value.
@@ -965,7 +966,7 @@ export const SelfHostedVideo = ({
965966 subtitleSource = { subtitleSource }
966967 subtitleSize = { subtitleSize }
967968 showIcons = { showIcons }
968- controlsPosition = { controlsPosition }
969+ iconsPosition = { controlsPosition }
969970 subtitlesPosition = { subtitlesPosition }
970971 activeCue = { activeCue }
971972 shouldLoop = { shouldLoop }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export const Default: Story = {
7373export const WithoutProgressBar : Story = {
7474 args : {
7575 ...Loop . args ,
76- hideProgressBar : false ,
76+ hideProgressBar : true ,
7777 } ,
7878} satisfies Story ;
7979
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export type Props = {
140140 activeCue ?: ActiveCue | null ;
141141 shouldLoop : boolean ;
142142 isInteractive : boolean ;
143- controlsPosition : ControlsPosition ;
143+ iconsPosition : ControlsPosition ;
144144 subtitlesPosition : SubtitlesPosition ;
145145} ;
146146
@@ -193,7 +193,7 @@ export const SelfHostedVideoPlayer = forwardRef(
193193 activeCue,
194194 shouldLoop,
195195 isInteractive,
196- controlsPosition ,
196+ iconsPosition ,
197197 subtitlesPosition,
198198 } : Props ,
199199 ref : React . ForwardedRef < HTMLVideoElement > ,
@@ -302,9 +302,9 @@ export const SelfHostedVideoPlayer = forwardRef(
302302 css = { [
303303 iconsContainerStyles ,
304304 iconSize === 'large' &&
305- largeIconsPositionStyles ( controlsPosition ) ,
305+ largeIconsPositionStyles ( iconsPosition ) ,
306306 iconSize === 'small' &&
307- smallIconsPositionStyles ( controlsPosition ) ,
307+ smallIconsPositionStyles ( iconsPosition ) ,
308308 ] }
309309 >
310310 { showFullscreenIcon && (
Original file line number Diff line number Diff line change @@ -4,9 +4,6 @@ import { SvgArrowExpand } from '@guardian/source/react-components';
44import { palette } from '../palette' ;
55import type { Props as SelfHostedVideoPlayerProps } from './SelfHostedVideoPlayer' ;
66
7- export type SubtitleSize = 'small' | 'medium' | 'large' ;
8- export type ControlsPosition = 'top' | 'bottom' ;
9-
107const buttonStyles = css `
118 border : none;
129 background : none;
You can’t perform that action at this time.
0 commit comments