[Glitch] Fixes YouTube embeds
Port 46f3b39fae to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
2f6cdd6d47
commit
05691293f0
1 file changed
+4
-2
@@ -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