mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-12 23:38:20 +00:00
[Glitch] Fixes YouTube embeds
Port 9bc9ebc59e to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -37,7 +37,10 @@ const handleIframeUrl = (html, url, providerName) => {
|
|||||||
iframeUrl.searchParams.set('autoplay', 1)
|
iframeUrl.searchParams.set('autoplay', 1)
|
||||||
iframeUrl.searchParams.set('auto_play', 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
|
iframe.src = iframeUrl.href
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user