Remove player ID from room data on player client disconnect #13
Labels
area: game runtime
Improvements to the core game experience.
good first issue
You can do this as a way to learn about the code! ❤
status: accepting prs
This issue is ready for a pull request.
type: bug
Something isn't working! Oh no!
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'scurrentTime
.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, if that client is the
player
, clear the room'splayer
.(Blocked on #10 being merged)
The text was updated successfully, but these errors were encountered: