mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +00:00
Fixes YouTube embeds (#37126)
This commit is contained in:
@@ -48,8 +48,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