From 4fe8e87416b3b6c41736060cd20db08fd5b826cf Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Tue, 9 Jun 2026 08:22:05 -0500 Subject: [PATCH] fix(player-web): render widgets in any zone, not just zone_type=widget A widget (e.g. directory board) assigned to a 'content' zone rendered as a black zone: showZoneItem gated the widget branch on zone.zone_type==='widget', so the widget was skipped and (mime_type null) nothing else matched either. Key off the assignment's widget_id instead - matching the Android ZoneManager, which is why the same layout worked on the APK but not the web player. --- server/player/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/player/index.html b/server/player/index.html index d27b8cd..7e37441 100644 --- a/server/player/index.html +++ b/server/player/index.html @@ -1506,7 +1506,11 @@ const src = a.remote_url || `${config.serverUrl}/uploads/content/${a.filepath}`; const dur = (a.duration_sec || 10) * 1000; - if (zone.zone_type === 'widget' && a.widget_id) { + // Render based on what the ASSIGNMENT is (widget_id), not the zone's type: + // a widget can be placed in a 'content' zone, and gating on zone_type==='widget' + // left those zones blank (mime_type is null -> no video/image match). Matches the + // Android player, which keys off the assignment's widget_type. + if (a.widget_id) { const iframe = document.createElement('iframe'); iframe.src = `${config.serverUrl}/api/widgets/${a.widget_id}/render`; // Sandbox into a unique origin so widget scripts can't read window.parent