From 546fcdc1055278a66b7f6362b082721ebbc11b1d Mon Sep 17 00:00:00 2001 From: ScreenTinker Date: Mon, 8 Jun 2026 23:12:29 -0500 Subject: [PATCH] fix(player-web): independent per-zone rotation in multi-zone layouts Mirror of the Android fix. The web player showed only the FIRST assignment per zone (playlist.find) and an image zone set the GLOBAL advanceTimer->nextItem, so the whole layout re-rendered on one global tick instead of each zone cycling its own content. Now each zone groups its assignments (by zone_id, sorted), renders the first, and advances on its OWN timer (images/widgets/youtube: duration; videos: on end; single-item zones loop). Cleared in teardown. Also render zones before the single-item 'renderable?' bail so an empty current item can't blank the screen. --- server/player/index.html | 122 +++++++++++++++++++++++++++------------ 1 file changed, 84 insertions(+), 38 deletions(-) diff --git a/server/player/index.html b/server/player/index.html index 11c5815..d27b8cd 100644 --- a/server/player/index.html +++ b/server/player/index.html @@ -329,6 +329,9 @@ // playback muted). let userHasInteracted = false; let advanceTimer = null; + // Per-zone rotation timers (multi-zone). Each zone advances independently on + // its own interval, decoupled from the fullscreen advanceTimer/nextItem. + let zoneTimers = {}; // Video wall state. wallConfig is the tile assignment from the server // (null when this device isn't in a wall). The leader runs the playlist // normally and broadcasts wall:sync every second; followers don't run @@ -1297,8 +1300,14 @@ // releases the decoder and kills audio. Null event handlers so a late onended // can't fire into a stale playlist state. Queries all