mirror of
https://github.com/screentinker/screentinker.git
synced 2026-05-15 07:32:23 -06:00
Deleting a content asset that was actively displayed on screens caused affected players to go black and never recover; deleting an actively-playing video also failed to stop playback (audio kept going). Root cause: handlePlaylistUpdate never tore down the current media element and could drive currentIndex to NaN when a late onended fired during the playlist swap. - Add teardownCurrentMedia() - pause, clear src, .load() to actually release the decoder and kill audio; null event handlers to prevent late onended races - handlePlaylistUpdate: preserve continuity - if the playing item survives the update keep it playing, otherwise walk forward from the old position to the next surviving item; empty playlist tears down to waiting state - Guard playCurrentItem against empty playlist / non-finite index - Remove dead device:content-delete socket handler (never emitted) Resolves #4 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| config | ||
| db | ||
| lib | ||
| middleware | ||
| player | ||
| routes | ||
| services | ||
| ws | ||
| .gitignore | ||
| config.js | ||
| package-lock.json | ||
| package.json | ||
| server.js | ||