File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
dotcom-rendering/src/components/Card Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,14 @@ export type Props = {
96
96
showClock ?: boolean ;
97
97
mainMedia ?: MainMedia ;
98
98
/**
99
- * Note YouTube recommends a minimum width of 480px @see https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-youtube-player-size
100
- * At 300px or below, the player will begin to lose functionality e.g. volume controls being omitted.
101
- * Youtube requires a minimum width 200px.
99
+ * For interactive media (e.g., video or slideshow), certain card sizes are restricted from displaying
100
+ * the interactive content because controls may be unavailable or inaccessible at those sizes.
101
+ *
102
+ * Note:
103
+ * - YouTube recommends a minimum embed width of 480px
104
+ * @see https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-youtube-player-size
105
+ * - At widths of 300px or below, the player may lose functionality (e.g., volume controls may be omitted).
106
+ * - YouTube requires an absolute minimum width of 200px.
102
107
*/
103
108
canPlayInline ?: boolean ;
104
109
kickerText ?: string ;
@@ -281,7 +286,9 @@ const getMedia = ({
281
286
mainMedia,
282
287
} as const ;
283
288
}
284
- if ( slideshowImages ) return { type : 'slideshow' , slideshowImages } as const ;
289
+ if ( slideshowImages && canPlayInline ) {
290
+ return { type : 'slideshow' , slideshowImages } as const ;
291
+ }
285
292
if ( avatarUrl ) return { type : 'avatar' , avatarUrl } as const ;
286
293
if (
287
294
mainMedia ?. type === 'Audio' &&
@@ -353,7 +360,7 @@ export const Card = ({
353
360
avatarUrl,
354
361
showClock,
355
362
mainMedia,
356
- canPlayInline,
363
+ canPlayInline = false ,
357
364
kickerText,
358
365
showPulsingDot,
359
366
starRating,
You can’t perform that action at this time.
0 commit comments