fix (hopefully) for video embedding in SB+
This commit is contained in:
@@ -54,6 +54,8 @@ export function prepareSandboxIFrame(): PreloadedIFrame {
|
||||
// This one works in all browsers, although it's probably less secure
|
||||
iframe.src = "about:blank";
|
||||
iframe.style.visibility = "hidden";
|
||||
iframe.allow =
|
||||
"accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share";
|
||||
|
||||
const ready = new Promise<void>((resolve) => {
|
||||
iframe.onload = () => {
|
||||
|
||||
@@ -55,7 +55,9 @@ function embed.youtube(specOrUrl)
|
||||
src="https://www.youtube.com/embed/" .. videoId,
|
||||
style="width: " .. width .. "; height: " .. height,
|
||||
class = "sb-video-embed",
|
||||
referrerpolicy = "strict-origin-when-cross-origin"
|
||||
referrerpolicy = "strict-origin-when-cross-origin",
|
||||
allow = "accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture; web-share",
|
||||
allowfullscreen = "true",
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user