From 7f7dc80a8cf56fdbf1145275d4d8dbb0f432bbad Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Sun, 14 Jun 2026 18:18:58 -0500 Subject: [PATCH] =?UTF-8?q?fix(content):=20YouTube=20preview=20153=20?= =?UTF-8?q?=E2=80=94=20drop=20enablejsapi/origin=20from=20the=20passive=20?= =?UTF-8?q?embed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The content-tab preview embedded a RAW iframe with enablejsapi=1 (baked into the stored /embed URL by /youtube) plus origin=window.location.origin — but the content tab loads the YouTube IFrame API zero times. enablejsapi=1 + origin tells YouTube's player to expect a postMessage handshake from a parent JS API that never exists here, which surfaces as "Video player configuration error" (153). Same-video proof: it plays on the device player (which loads iframe_api + uses YT.Player, so the handshake completes) and failed only on the content tab — so it was never a video/embeddability problem, purely the embed construction. Fix: the preview is passive (never drives playback via JS), so it must not declare the JS API — strip enablejsapi + origin, leaving a plain /embed/ID (the form that plays in a bare tab). Did NOT touch /youtube storage (the player extracts the videoId and ignores stored params, so the baked-in enablejsapi is harmless there). Retracts the earlier wrong "validate embeddability at add-time" diagnosis (never built — it would have rejected this embeddable video). Frontend-only; suite 149 green. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/js/views/content-library.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/views/content-library.js b/frontend/js/views/content-library.js index 9a0038e..2ae201f 100644 --- a/frontend/js/views/content-library.js +++ b/frontend/js/views/content-library.js @@ -635,7 +635,7 @@ function showPreview(content) {
${isYoutube - ? `` + ? `` : isVideo ? `` : ``