From 0569a037b2bc73cd4bfc0eb6c19e61c64d3aa7eb Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 12 May 2026 13:46:16 +0200 Subject: [PATCH] fix (hopefully) for video embedding in SB+ --- client/components/widget_sandbox_iframe.ts | 2 ++ libraries/Library/Std/Widgets/Embed.md | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/components/widget_sandbox_iframe.ts b/client/components/widget_sandbox_iframe.ts index ab21ffcb..b73bab11 100644 --- a/client/components/widget_sandbox_iframe.ts +++ b/client/components/widget_sandbox_iframe.ts @@ -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((resolve) => { iframe.onload = () => { diff --git a/libraries/Library/Std/Widgets/Embed.md b/libraries/Library/Std/Widgets/Embed.md index c1cae174..c55754e1 100644 --- a/libraries/Library/Std/Widgets/Embed.md +++ b/libraries/Library/Std/Widgets/Embed.md @@ -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