mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +00:00
[Glitch] Fixes YouTube embeds
Port 46f3b39fae to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user