From 05691293f038e825e5976edbb2818de89dd5a994 Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 4 Dec 2025 17:27:20 +0100 Subject: [PATCH] [Glitch] Fixes YouTube embeds Port 46f3b39faefb8f5bc2c8d70c705c822bf3834bfa to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/status/components/card.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/features/status/components/card.tsx b/app/javascript/flavours/glitch/features/status/components/card.tsx index ef1b05064f..7030eaf8c5 100644 --- a/app/javascript/flavours/glitch/features/status/components/card.tsx +++ b/app/javascript/flavours/glitch/features/status/components/card.tsx @@ -34,8 +34,10 @@ const handleIframeUrl = (html: string, url: string, providerName: string) => { iframeUrl.searchParams.set('autoplay', '1'); iframeUrl.searchParams.set('auto_play', '1'); - if (startTime && providerName === 'YouTube') - iframeUrl.searchParams.set('start', startTime); + if (providerName === 'YouTube') { + iframeUrl.searchParams.set('start', startTime ?? ''); + iframe.referrerPolicy = 'strict-origin-when-cross-origin'; + } iframe.src = iframeUrl.href;