kenperlin / kenperlin/chalktalk

Cannot Spectate Chalktalk from Another Window or Computer

Open
#48 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

Before it was possible to run the Chalktalk server on one machine and view the same Chalktalk instance from another machine by loading ip_address_of_server_machine:11235. This works on the master branch, but not on the mr branches. Also, I notice that on the mr branches, the server crashes if you try refreshing the page. In the master branch this does not happen. I wonder if the issues with server connectivity are related.
We should restore this if possible to allow for easier testing when we try implementing multiple cursors.
On the subject of multiple cursors, I thought it may be possible to start with a cursor per sketchPage since I found the following:

g.js L 1747
events_canvas.keyDown = function(key) { e2s(); sketchPage.keyDown(key); }
events_canvas.keyUp = function(key) { e2s(); sketchPage.keyUp(key); }
events_canvas.mouseDown = function(x, y, z) { e2s(); sketchPage.mouseDown(x, y, z); }
events_canvas.mouseDrag = function(x, y, z) { e2s(); sketchPage.mouseDrag(x, y, z); }
events_canvas.mouseMove = function(x, y, z) { e2s(); sketchPage.mouseMove(x, y, z); }
events_canvas.mouseUp = function(x, y, z) { e2s(); sketchPage.mouseUp (x, y, z); }

However, I doubt this would work since there are other global variables not tied to the page that probably control mouse movement and actions. It may be worth a try though!

Contributor guide

Open the contributing guide

Research direction

Compare the master and mr branches, beginning with the server behavior when loading ip_address_of_server_machine:11235 from another computer and when refreshing the page. Review g.js around line 1747 for the noted event routing, then reproduce both cases; done means remote spectating works and refreshing no longer crashes the server.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.