Events
Emit collab:playback-sync
Play/pause/seek state broadcast by the presenter to the other members.
client → server on the
collab channel. Socket.IO event name: collab:playback-sync.Play/pause/seek state broadcast by the presenter to the other members.
Only the current presenter socket may broadcast; other senders receive collab:playback-sync:rejected instead and nothing is relayed. Client -> server -> all other sockets in the same /chat/{chatId} namespace. The server spreads the client payload and appends the authenticated user identity (userId, displayName, color, avatarUrl), the annotationColor assigned on collab:join and a timestamp; client supplied values for those keys are overwritten. The server also stores currentTime/playing as the namespace playback state.
Payload: collab:playback-sync
Payload of the 'collab:playback-sync' socket event.
| Property | Type | Required | Description |
|---|---|---|---|
action | string | no | Client supplied action (e.g. 'play', 'pause', 'seek'). |
currentTime | number | no | |
playing | boolean | no | |
duration | number | no | |
playbackRate | number | no | |
userId | string | no | Authenticated user ID (server supplied, cannot be spoofed). |
displayName | string | null | no | Display name (falls back to first + last name). |
color | string | null | no | The user's profile colour. |
avatarUrl | string | null | no | keyPath of the user's avatar thumbnail file, if any. |
annotationColor | string | no | Annotation colour assigned to this user for the collab session. |
timestamp | integer | no | Server time in milliseconds since epoch when the event was relayed. |