The Party context implements synchronized watch-party playback. Users create a party session, invite members, and watch media together with wall-clock synchronization, jitter compensation, and WebSocket-based real-time state broadcasting.
Party session with host, video, members, playback state, and jitter compensation
PartyMember
Model
A member within a party session
MemberRole
Value Object (enum)
Role within a party (Host, Member)
PlaybackAction
Value Object (enum)
Playback command (Play, Pause, Seek)
PlaybackState
Value Object (enum)
Current playback state (Stopped, Playing, Paused)
State value objects SyncedPartySessionState and PartyMemberState keep constructor/create/reconstitute in sync per the project's aggregate root convention.
REST endpoints use /api/party/sessions. Session {uuid} parameters are UUIDs, not PublicId NanoIDs. Session resources expose both uuid and the separate 21-character publicId.
HTTP lookup of session details and WebSocket connection URL
The lookup takes the session's 21-character PublicId, rather than its UUID. It sits outside the default /api OpenAPI export. Playback messages and state broadcasts use the shared WebSocket runtime, not the HTTP lookup controller.
PartyWebSocketController returns connection information. The shared WebSocketController dispatches playback commands and broadcasts events between party members.