Skip to content

Split room.js from app.js

Nayeem Rahman requested to merge app-refactor into master

Closes #14 (closed).

You get a Room using connect() which just takes a room name argument. A Room is a headless canvas on which you can currently addPath() and extendPath(). It dispatches event addOrUpdatePath when these methods are called, whether locally or remotely. The operations we support are characterised by the set of methods/events it has, these will change.

@ml5717 Regarding the change to src/y-webrtc/index.js: I needed a way to add the event listener before initialisation to fix a race condition. I tried to take the initialiseConnection() call out of the constructor but the constructor froze when I did... didn't investigate it too much. Open to any better fix.

Please review.

Edited by Nayeem Rahman

Merge request reports