From 818140c9e41d67aae33b25314dcd15b8a6809404 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 16 Mar 2023 15:21:39 +0100 Subject: [PATCH] add new default server - fixes #43 --- demo/index.js | 2 +- src/y-webrtc.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/index.js b/demo/index.js index 78e4502..ff88bf1 100644 --- a/demo/index.js +++ b/demo/index.js @@ -4,7 +4,7 @@ import * as Y from 'yjs' import { WebrtcProvider } from '../src/y-webrtc.js' const ydoc = new Y.Doc() -const provider = new WebrtcProvider('webrtc-test', ydoc, { signaling: ['ws://localhost:4444'] }) +const provider = new WebrtcProvider('webrtc-test', ydoc, { signaling: ['ws://localhost:8080'] }) const yarray = ydoc.getArray() provider.on('synced', synced => { diff --git a/src/y-webrtc.js b/src/y-webrtc.js index c4c8779..af4604d 100644 --- a/src/y-webrtc.js +++ b/src/y-webrtc.js @@ -559,7 +559,7 @@ export class WebrtcProvider extends Observable { roomName, doc, { - signaling = ['wss://signaling.yjs.dev', 'wss://y-webrtc-signaling-eu.herokuapp.com', 'wss://y-webrtc-signaling-us.herokuapp.com'], + signaling = ['wss://y-webrtc-eu.fly.dev'], password = null, awareness = new awarenessProtocol.Awareness(doc), maxConns = 20 + math.floor(random.rand() * 15), // the random factor reduces the chance that n clients form a cluster