Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3851] - Feat/install socketio yjs #3915

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,11 @@ class Activity {
};

mediaRecorder.start(200);
setTimeout(() => {
// eslint-disable-next-line no-console
console.log("Resizing for Record", that.canvas.height);
that._onResize();
}, 500);
return mediaRecorder;
}

Expand Down
18 changes: 18 additions & 0 deletions js/collaboration/collaboration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-disable no-undef */
import Y, { Doc } from "yjs";
import SocketIOProvider from "y-socket.io";

// const Y = require("yjs");
// const SocketIOProvider = require("y-socket.io");

console.log(Y);
console.log(SocketIOProvider);

const doc = new Doc();
const yMap = doc.getMap();

const socketIOProvider = new SocketIOProvider("ws://localhost:5000", "testing-doc", doc, {
autoConnect: true
});

socketIOProvider.awareness.on("change", () => console.log("connected from client"));