diff --git a/js/activity.js b/js/activity.js index 4128d67b0d..9b2ff122db 100644 --- a/js/activity.js +++ b/js/activity.js @@ -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; } diff --git a/js/collaboration/collaboration.js b/js/collaboration/collaboration.js new file mode 100644 index 0000000000..5c30b1f7b7 --- /dev/null +++ b/js/collaboration/collaboration.js @@ -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"));