bugfix
This commit is contained in:
parent
8e46c533fb
commit
7d25d29337
@ -143,7 +143,6 @@ bricks.RTCClient = class extends bricks.VBox {
|
|||||||
to:peer_info
|
to:peer_info
|
||||||
}
|
}
|
||||||
this.peer_info = peer_info;
|
this.peer_info = peer_info;
|
||||||
|
|
||||||
this.role = 'requester';
|
this.role = 'requester';
|
||||||
this.socket.send(JSON.stringify(d));
|
this.socket.send(JSON.stringify(d));
|
||||||
}
|
}
|
||||||
@ -231,16 +230,16 @@ bricks.RTCClient = class extends bricks.VBox {
|
|||||||
console.log('offer branch exe');
|
console.log('offer branch exe');
|
||||||
break;
|
break;
|
||||||
case 'answer':
|
case 'answer':
|
||||||
console.log('answer: d.from=', d.from, 'peer_info=', self.peer_info);
|
console.log('answer: d.from=', d.from, 'peer_info=', this.peer_info);
|
||||||
if (d.from.id == self.peer_info.id){
|
if (d.from.id == this.peer_info.id){
|
||||||
var desc = new RTCSessionDescription(d.answer);
|
var desc = new RTCSessionDescription(d.answer);
|
||||||
await this.pc.setRemoteDescription(desc);
|
await this.pc.setRemoteDescription(desc);
|
||||||
console.log('answer branch exe');
|
console.log('answer branch exe');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'iceCandidate':
|
case 'iceCandidate':
|
||||||
console.log('iceCandidate: d.from=', d.from, 'peer_info=', self.peer_info);
|
console.log('iceCandidate: d.from=', d.from, 'peer_info=', this.peer_info);
|
||||||
if (d.from.id == self.peer_info.id){
|
if (d.from.id == this.peer_info.id){
|
||||||
var candidate = new RTCIceCandidate(d.candidate);
|
var candidate = new RTCIceCandidate(d.candidate);
|
||||||
await this.pc.addIceCandidate(candidate);
|
await this.pc.addIceCandidate(candidate);
|
||||||
console.log('iceCandidate branch exe');
|
console.log('iceCandidate branch exe');
|
||||||
|
Loading…
Reference in New Issue
Block a user