karaokenite / karaokenite/karaokenite-react
Remove player ID from room data on player client disconnect
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Following #9: #10 fleshes introduces the concept of a room `player`, which is the client who has most recently caused the video to play. The player is the only client the server will listen to for updates to a playing video's `currentTime`.
Unfortunately, if that player _leaves_ (in socket.io terms, _disconnects_), nothing indicates to the room that another client should become a new player. Bug: if a new client joins, the server won't have a recently updated `currentTime` to send them! 😱
Proposal: on [client disconnect](https://socket.io/docs/client-api/#Event-%E2%80%98disconnect%E2%80%99), if that client is the `player`, clear the room's `player`.
_(Blocked on #10 being merged)_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing #10 and the room state handling for the Socket.IO client disconnect event. Confirm how the room identifies its current player and clear that value when the disconnecting client is the player. Done means a later client can become the player and newly joined clients receive an updated currentTime.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100