Repo for the websocket server for hackathon
(protocol version 4)
- Participant — anyone connected to the session
- Presenter — a participant currently editing the site 🐵
- Spectator — a participant following the presenter's activity 🐠
Object { id, participants: { id:name }, presenterId, snapshot? }
// session spectator data and (optionally) state snapshot
Object { spectatorId, name } // 'spectatorId' has joined the session
Object { spectatorId } // 'spectatorId' has left the session
Object { presenterId } // 'presenterId' has become the presenter
Object { spectatorId } // spectator 'spectatorId' requested control
// participant's control request was denied
// newly connected spectator requests state snapshot
Object change // got a change from the presenter
Object { participantId, message } // got a chat message
Object { name, siteId } // user 'name' joins session 'siteId'
Object { snapshot } // presenter sends snapshot
Object change // send a change to spectators
Object message // send a chat message to everyone in the session
// request presenter control
// unconditionally take presenter control
Object { spectatorId } // grant presenter control to 'spectatorId'
Object { spectatorId } // deny presenter control to 'spectatorId'