mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Fixes YouTube embeds (#37126)
This commit is contained in:
parent
a6d31c0ccf
commit
9bc9ebc59e
1 changed files with 4 additions and 1 deletions
|
|
@ -48,7 +48,10 @@ const handleIframeUrl = (html, url, providerName) => {
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue