asteroid/parenscript
Glenn Thompson 10c75f04e1 Stream sync, countdown timer, playback state fix, buffer bloat detection
Multi-pronged attempt to fix cumulative lag between audio playback,
now-playing display, and browser notifications:

== Synchronization (work in progress) ==
- Server-side time-based metadata delay via get-listener-now-playing
  with configurable *browser-buffer-seconds* parameter
- First track after restart syncs perfectly; subsequent tracks drift
  due to browser audio buffer bloat (buffer grows unbounded over time)
- Added client-side buffer bloat detection: monitors audio.buffered
  vs audio.currentTime and auto-reconnects when buffer exceeds 15s
- Added [STREAM-SYNC], [NOTIFY], [BUFFER] diagnostic logging to
  browser console for ongoing diagnosis

== Countdown timer ==
- Server exposes remaining seconds via pipeline-track-remaining
- now-playing JSON API includes 'remaining' field adjusted for
  browser buffer delay
- Player frame shows [mm:ss] countdown next to track title
- Main page now-playing area also shows countdown with its own
  polling (15s interval) and local 1-second ticker
- LASS styles for .track-countdown and .track-countdown-mini

== Playback state fix ==
- Fixed save-playback-state saving one track ahead of what was
  actually playing (was saving the track loading during crossfade)
- Uses *pending-save-file* with one-track delay so the saved state
  reflects the track that was actually heard

== Notifications ==
- All notification conditions working correctly per diagnostic logs
- show-track-notification logs supported/permission/enabled/last/title
- Notifications fire consistently on track changes
2026-04-09 16:32:58 +01:00
..
admin.lisp Remove Icecast/Liquidsoap, migrate fully to Harmony/CL-Streamer 2026-03-05 17:24:12 +03:00
auth-ui.lisp fix: Normalize USERS table timestamps before dm:save to prevent PostgreSQL type errors 2025-12-29 09:39:51 -05:00
dj-console.lisp Fix DJ Console: 400 POST error, library search SQL, auto-playlist pause, now-playing override 2026-03-06 08:06:02 +03:00
frameset-utils.lisp Fix geo stats peak tracking and migrate inline JS to ParenScript 2025-12-14 10:20:32 -05:00
front-page.lisp Stream sync, countdown timer, playback state fix, buffer bloat detection 2026-04-09 16:32:58 +01:00
parenscript-utils.lisp fix: add parenscript utils file 2026-03-02 17:51:26 -05:00
player.lisp Add shuffle stream as second pipeline 2026-03-08 13:32:51 +03:00
profile.lisp feat: Custom user playlists with submission and admin review 2025-12-21 18:45:35 +03:00
recently-played.lisp Fix listener count and recently-played rendering 2026-03-03 23:25:23 +03:00
spectrum-analyzer.lisp Add mini spectrum analyzer to player frame with theme/style sync 2026-01-11 13:25:55 -05:00
stream-player.lisp Stream sync, countdown timer, playback state fix, buffer bloat detection 2026-04-09 16:32:58 +01:00
users.lisp Fix last-login timezone handling 2025-12-19 18:00:30 -05:00