watchparty/server
Nicolas 3ae1fce806
Some checks failed
Publier l'image Docker / test (pull_request) Failing after 4s
Publier l'image Docker / publish (pull_request) Has been skipped
Fix device takeover leaving both devices on the session with no working controls
Two gaps around an already-correct takeover mechanism, not the
mechanism itself. First: Player.ts/MusicBar.ts both wired onClose to a
no-op, so the moment a takeover force-disconnected the old device its
video/hls.js instance (or the persistent music bar) just kept running
forever on a dead connection - both devices looked fully active, since
nothing ever told the old one to stop or navigate away. Second: the
obvious fix (call the same leave path Quitter uses) ran into a worse
bug - POST /leave removes a member by userId alone with no staleness
guard, so the old devices own leave call would have ended the NEW
devices membership too. Fixed both: onClose now tears down local
playback and leaves whenever this routes own explicit teardown has not
already run, and the leave route (plus the client, which now sends its
own deviceId) gained the same staleness guard the socket handlers
already had, via a new PartyService.isStaleDevice.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 10:23:22 +02:00
..
src Fix device takeover leaving both devices on the session with no working controls 2026-09-18 10:23:22 +02:00
test Fix device takeover leaving both devices on the session with no working controls 2026-09-18 10:23:22 +02:00
.dockerignore Pivot to a standalone app - Emby plugin hit a hard wall 2026-09-13 20:48:55 +02:00
.env.example Pivot to a standalone app - Emby plugin hit a hard wall 2026-09-13 20:48:55 +02:00
Dockerfile Self-hosted ffmpeg pipeline for PGS (image) subtitle burn-in 2026-09-14 18:05:08 +02:00
package-lock.json Rewrite server + client in TypeScript, service-oriented server architecture 2026-09-14 09:38:14 +02:00
package.json Report watch-party streams to Emby's own Sessions API (admin dashboard) 2026-09-15 23:45:14 +02:00
tsconfig.json Rewrite server + client in TypeScript, service-oriented server architecture 2026-09-14 09:38:14 +02:00
tsconfig.test.json Add a real server test suite and gate CI's Docker publish on it 2026-09-14 09:57:47 +02:00