From a1c477d834cdd1f595f51b16adecd52e7a1a6599 Mon Sep 17 00:00:00 2001 From: Klemek Date: Fri, 14 Mar 2025 08:58:52 +0100 Subject: [PATCH] wip --- index.html | 2 +- main.js | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index a761fb6..ae8147d 100644 --- a/index.html +++ b/index.html @@ -51,7 +51,7 @@

- +
diff --git a/main.js b/main.js index dcedb7b..87a52a2 100644 --- a/main.js +++ b/main.js @@ -44,21 +44,14 @@ const app = createApp({ }, connect() { if (this.remoteId) { - this.initConnection(this.peer.connect(this.remoteId)); + this.initConnection( + this.peer.connect(this.remoteId, { reliable: true }), + ); } }, initPeer() { this.peer = new Peer({ - config: { - iceServers: [ - { urls: "stun:stun.l.google.com:19302" }, - // { - // urls: [`turn:127.0.0.1:3478`, `turns:127.0.0.1:5349`], - // username: "user", - // credential: "pass", - // }, - ], - }, + debug: 3, }); this.peer.on("open", this.peerOpen); this.peer.on("connection", this.peerConnection); @@ -126,7 +119,6 @@ const app = createApp({ connClose() { console.log("connClose"); this.connection = null; - this.connectionOpen = false; // TODO handle conn close }, connError(err) {