File tree Expand file tree Collapse file tree 5 files changed +15
-11
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 5 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ const getMedia = ({
254
254
canPlayInline ?: boolean ;
255
255
isBetaContainer : boolean ;
256
256
} ) => {
257
- if ( mainMedia ?. type === 'LoopVideo' ) {
257
+ if ( mainMedia ?. type === 'LoopVideo' && canPlayInline ) {
258
258
return {
259
259
type : 'loop-video' ,
260
260
mainMedia,
@@ -887,18 +887,18 @@ export const Card = ({
887
887
/>
888
888
</ AvatarContainer >
889
889
) }
890
- { mainMedia ? .type === 'LoopVideo ' && (
890
+ { media . type === 'loop-video ' && (
891
891
< Island
892
892
priority = "feature"
893
893
defer = { { until : 'visible' } }
894
894
>
895
895
< LoopVideo
896
- src = { mainMedia . videoId }
897
- height = { mainMedia . height }
898
- width = { mainMedia . width }
899
- videoId = { mainMedia . videoId }
896
+ src = { media . mainMedia . videoId }
897
+ height = { media . mainMedia . height }
898
+ width = { media . mainMedia . width }
899
+ videoId = { media . mainMedia . videoId }
900
900
thumbnailImage = {
901
- mainMedia . thumbnailImage ?? ''
901
+ media . mainMedia . thumbnailImage ?? ''
902
902
}
903
903
fallbackImageComponent = {
904
904
< CardPicture
Original file line number Diff line number Diff line change @@ -99,6 +99,8 @@ const ImmersiveCardLayout = ({
99
99
imageLoading : Loading ;
100
100
collectionId : number ;
101
101
} ) => {
102
+ const isLoopingVideo = card . mainMedia ?. type === 'LoopVideo' ;
103
+
102
104
return (
103
105
< UL padBottom = { true } >
104
106
< LI key = { card . url } padSides = { true } >
@@ -113,7 +115,7 @@ const ImmersiveCardLayout = ({
113
115
kickerText = { card . kickerText }
114
116
showClock = { false }
115
117
image = { card . image }
116
- canPlayInline = { true }
118
+ canPlayInline = { isLoopingVideo ? false : true }
117
119
starRating = { card . starRating }
118
120
dataLinkName = { card . dataLinkName }
119
121
discussionApiUrl = { card . discussionApiUrl }
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export const ScrollableFeature = ({
38
38
visibleCarouselSlidesOnTablet = { 3 }
39
39
>
40
40
{ trails . map ( ( card ) => {
41
+ const isLoopingVideo = card . mainMedia ?. type === 'LoopVideo' ;
41
42
return (
42
43
< ScrollableCarousel . Item key = { card . url } >
43
44
< FeatureCard
@@ -54,7 +55,7 @@ export const ScrollableFeature = ({
54
55
}
55
56
showClock = { false }
56
57
image = { card . image }
57
- canPlayInline = { true }
58
+ canPlayInline = { isLoopingVideo ? false : true }
58
59
starRating = { card . starRating }
59
60
dataLinkName = { card . dataLinkName }
60
61
discussionApiUrl = { card . discussionApiUrl }
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export const ScrollableMedium = ({
71
71
showLivePlayable = { trail . showLivePlayable }
72
72
showTopBarDesktop = { false }
73
73
showTopBarMobile = { false }
74
+ canPlayInline = { false }
74
75
/>
75
76
</ ScrollableCarousel . Item >
76
77
) ;
Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ export const StaticFeatureTwo = ({
33
33
collectionId,
34
34
} : Props ) => {
35
35
const cards = trails . slice ( 0 , 2 ) ;
36
-
37
36
return (
38
37
< UL direction = "row" >
39
38
{ cards . map ( ( card ) => {
39
+ const isLoopingVideo = card . mainMedia ?. type === 'LoopVideo' ;
40
40
return (
41
41
< LI
42
42
stretch = { false }
@@ -59,7 +59,7 @@ export const StaticFeatureTwo = ({
59
59
}
60
60
showClock = { false }
61
61
image = { card . image }
62
- canPlayInline = { true }
62
+ canPlayInline = { isLoopingVideo ? false : true }
63
63
starRating = { card . starRating }
64
64
dataLinkName = { card . dataLinkName }
65
65
discussionApiUrl = { card . discussionApiUrl }
You can’t perform that action at this time.
0 commit comments