File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ type Props = {
18
18
videoId : string ;
19
19
width ?: number ;
20
20
height ?: number ;
21
- posterImage : string ;
21
+ thumbnailImage : string ;
22
22
fallbackImageComponent : JSX . Element ;
23
23
hasAudio ?: boolean ;
24
24
} ;
@@ -28,7 +28,7 @@ export const LoopVideo = ({
28
28
videoId,
29
29
width = 600 ,
30
30
height = 360 ,
31
- posterImage ,
31
+ thumbnailImage ,
32
32
fallbackImageComponent,
33
33
hasAudio = true ,
34
34
} : Props ) => {
@@ -169,7 +169,9 @@ export const LoopVideo = ({
169
169
handleKeyDown = { handleKeyDown }
170
170
onError = { onError }
171
171
AudioIcon = { AudioIcon }
172
- posterImage = { prefersReducedMotion ? posterImage : undefined }
172
+ thumbnailImage = {
173
+ prefersReducedMotion ? thumbnailImage : undefined
174
+ }
173
175
/>
174
176
</ div >
175
177
) ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const Default = {
23
23
videoId : 'test-video-1' ,
24
24
height : 337.5 ,
25
25
width : 600 ,
26
- posterImage :
26
+ thumbnailImage :
27
27
'https://media.guim.co.uk/9bdb802e6da5d3fd249b5060f367b3a817965f0c/0_0_1800_1080/master/1800.jpg' ,
28
28
fallbackImageComponent : (
29
29
< CardPicture
Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ type Props = {
56
56
onError : ( event : SyntheticEvent < HTMLVideoElement > ) => void ;
57
57
AudioIcon : ( iconProps : IconProps ) => JSX . Element ;
58
58
/**
59
- * We show a poster image when the user has indicated that they do
59
+ * We show a thumbnail image when the user has indicated that they do
60
60
* not want videos to play automatically, e.g. prefers reduced motion.
61
61
*/
62
- posterImage ?: string ;
62
+ thumbnailImage ?: string ;
63
63
} ;
64
64
65
65
/**
@@ -75,7 +75,7 @@ export const LoopVideoPlayer = forwardRef(
75
75
height,
76
76
hasAudio,
77
77
fallbackImageComponent,
78
- posterImage ,
78
+ thumbnailImage ,
79
79
isPlayable,
80
80
setIsPlayable,
81
81
isPlaying,
@@ -99,13 +99,13 @@ export const LoopVideoPlayer = forwardRef(
99
99
< video
100
100
id = { loopVideoId }
101
101
ref = { ref }
102
- preload = { posterImage ? 'metadata' : 'none' }
102
+ preload = { thumbnailImage ? 'metadata' : 'none' }
103
103
loop = { true }
104
104
muted = { isMuted }
105
105
playsInline = { true }
106
106
height = { height }
107
107
width = { width }
108
- poster = { posterImage ?? undefined }
108
+ poster = { thumbnailImage ?? undefined }
109
109
onPlaying = { ( ) => {
110
110
setIsPlaying ( true ) ;
111
111
} }
You can’t perform that action at this time.
0 commit comments