This commit is contained in:
yumoqing 2024-08-20 16:58:09 +08:00
parent 7364dbe323
commit 64360fc964

View File

@ -36,6 +36,7 @@ bricks.RTCClient = class extends bricks.VBox {
this.videobox.add_widget(this.remoteVideo);
this.add_widget(this.videobox);
this.peerConnection;
this.onlineList= [];
this.socket = new WebSocket(this.signaling_url);
this.socket.onopen = this.signaling_login.bind(this);
this.socket.onclose = null;
@ -186,6 +187,7 @@ bricks.RTCClient = class extends bricks.VBox {
}
async signaling_message_handle(event){
var d = event.data;
console.log('data received from server', d);
switch (d.type){
case 'onlineList':
this.onlineList = d.onlineList;