Skip to content

Commit 61c5520

Browse files
committed
Extend video poster image main media to liveblog articles
1 parent 095e662 commit 61c5520

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dotcom-rendering/src/components/YoutubeBlockComponent.importable.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ export const YoutubeBlockComponent = ({
129129
return posterImage;
130130
}
131131

132+
// For Liveblog Articles with a Video atom for their main media
133+
// we need to display the poster image
134+
// Note: main media videos in liveblogs tend to be transitory eg PMQs
135+
if (contentLayout?.toLowerCase() === 'livebloglayout') {
136+
return posterImage;
137+
}
138+
132139
// Default behaviour is to use the override image, if supplied
133140
// otherwise use the poster image
134141
return overrideImage ?? posterImage;

dotcom-rendering/src/layouts/LiveLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ export const LiveLayout = (props: WebProps | AppsProps) => {
674674
isAdFreeUser={article.isAdFreeUser}
675675
editionId={article.editionId}
676676
shouldHideAds={article.shouldHideAds}
677+
contentLayout="LiveblogLayout"
677678
/>
678679
</div>
679680
</GridItem>

0 commit comments

Comments
 (0)