From abb289bbd5ff21664a2c2ce7493d67635b7f9a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Thu, 28 Sep 2023 23:57:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/client.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/public/client.js b/public/client.js index 3565e58..44fc50f 100644 --- a/public/client.js +++ b/public/client.js @@ -72,7 +72,6 @@ export default class ClientList { } } add(item) { - //this.clientlist.push(item) this.ul.appendChild(ListItem({ id: item.id, innerText: item.name ?? item.id, @@ -80,23 +79,6 @@ export default class ClientList { }, chidren: [] })) - //// 与对方建立连接(即使不传输数据) - //const webrtc = new RTCPeerConnection() - //const channel = webrtc.createDataChannel('music') - //channel.onopen = event => { - // console.log('clientlist music: channel.onopen') - // channel.send('hello') - //} - //channel.onmessage = event => { - // console.log('clientlist music: channel.onmessage', event.data) - //} - //// 监听 ICE 候选事件 - //webrtc.onicecandidate = event => { - // if (event.candidate) { - // console.log('clientlist onicecandidate', event.candidate) - // // 发送给对方(通过服务器) - // } - //} } remove(item) { this.clientlist = this.clientlist.filter(client => client.id !== item.id)