Skip to content

Add slideshow mode to the live view - #644

Merged
matteius merged 2 commits into
mainfrom
feat/live-slideshow
Oct 17, 2026
Merged

matteius merged 2 commits into
mainfrom
feat/live-slideshow

Conversation

@matteius

@matteius matteius commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an AnyCam-style slideshow to the live view. A new toolbar toggle auto-advances the grid on a timer:

  • 1×1 layout: cycles through cameras (drives the stream selector), wrapping at the end.
  • Larger grids: cycles through pages, wrapping at the end.
  • Respects the active tag / collection / favorites filters and custom camera order.
  • Interval picker (5 / 10 / 15 / 30 / 60s, default 10s) appears while on.
  • Persisted per browser and mirrored to the URL as ?slideshow=<seconds> (?slideshow=0 turns it off), so kiosks / wall displays can bookmark e.g. /?cols=1&rows=1&slideshow=15.
  • Pauses during tile reorder, per-tile native fullscreen, the building-plan surface, and while the tab is hidden. Keeps running in page fullscreen. Manual paging/selection restarts the countdown.
  • Toggle is hidden when there's nothing to cycle.

Wired into both LiveView (HLS/MSE) and WebRTCView. New strings in en and fil; other locales fall back to English.

Known limitation

Each slide change tears down and reconnects streams, same as clicking Next, so there's a ~1s load between slides (longer on HLS). Pre-warming the next slide's streams is a possible follow-up.

Test plan

  • npx jest: 47 suites / 368 tests pass
    • tests/liveSlideshow.spec.js: preference parsing, URL override, next-slide/wrap logic
    • tests/liveSlideshowHook.spec.js: hook timer behaviour via a deps-aware preact/hooks shim (page and camera cycling, interval, countdown reset on manual navigation, no reset on same-camera refetch, pause/resume, hidden tab, nothing-to-cycle, storage + ?slideshow= sync)
    • tests/liveSlideshowControl.spec.js: control rendered via esbuild; labels, aria-pressed, interval options, callbacks
    • Mutation-checked: dropping the pause/visibility guard, the countdown-reset deps, the refetch keying, the wrap modulo, or the URL cleanup each fails at least one test
  • npx vite build succeeds
  • Manual check in a browser: 1×1 camera cycling, 2×2 page cycling, ?slideshow= bookmark, pause on reorder/fullscreen tile

🤖 Generated with Claude Code

matteius and others added 2 commits October 17, 2026 05:46
Auto-advance the live grid on a timer: a 1x1 layout cycles through
cameras, larger grids cycle through pages. Interval is 5-60s, persisted
per browser and mirrored to ?slideshow=<seconds> so wall displays and
kiosks can bookmark it.

The slideshow pauses during tile reorder, per-tile native fullscreen,
the building plan surface, and while the tab is hidden. Manual paging
restarts the countdown. Wired into both the HLS/MSE and WebRTC views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover the useLiveSlideshow timer with a deps-aware preact/hooks shim:
page and camera cycling with wrap, interval choice, countdown reset on
manual navigation, no reset on same-camera refetch, pause/resume for the
caller's pause flag and hidden tabs, the nothing-to-cycle case, and
localStorage / ?slideshow= sync. Render LiveSlideshowControl via esbuild
and check its labels, pressed state, interval options and callbacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matteius
matteius merged commit 73775ca into main Oct 17, 2026
3 checks passed
@matteius
matteius deleted the feat/live-slideshow branch October 17, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant