From bfce97e3e26572f0c1adb19f93589832c58a6b9e Mon Sep 17 00:00:00 2001 From: Raphaelle Cantin Date: Tue, 19 Nov 2024 12:20:16 +0000 Subject: [PATCH] Remove TODO and add thumbnail to Embed slice --- common/views/components/VideoEmbed/VideoEmbed.tsx | 4 ---- content/webapp/services/prismic/transformers/body.ts | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/common/views/components/VideoEmbed/VideoEmbed.tsx b/common/views/components/VideoEmbed/VideoEmbed.tsx index bddbfccf0d..f64f55a2e2 100644 --- a/common/views/components/VideoEmbed/VideoEmbed.tsx +++ b/common/views/components/VideoEmbed/VideoEmbed.tsx @@ -71,10 +71,6 @@ const VideoEmbed: FunctionComponent = ({ const isVimeo = videoProvider === 'Vimeo'; useEffect(() => { - // TODO do we need analytics consent for vimeo? - // Do we need this? - /* */ - if (isYouTube && hasAnalyticsConsent) { // GA4 automatically tracks YouTube engagement, but requires the iframe api // script to have been loaded on the page. Since we're lazyloading youtube diff --git a/content/webapp/services/prismic/transformers/body.ts b/content/webapp/services/prismic/transformers/body.ts index 5d9be048a1..f4dbd4f98a 100644 --- a/content/webapp/services/prismic/transformers/body.ts +++ b/content/webapp/services/prismic/transformers/body.ts @@ -338,8 +338,8 @@ export function transformEmbedSlice( value: { embedUrl: getVimeoEmbedUrl(embed), videoProvider: 'Vimeo', - // TODO? Do we want to support it on legacy guides? - // videoThumbnail + videoThumbnail: + (embed.thumbnail_url_with_play_button as string) || undefined, caption: slice.primary.caption, transcript: slice.primary.transcript, },