bugfix
This commit is contained in:
parent
bb152aaa1b
commit
8e46c533fb
@ -59,7 +59,7 @@ bricks.RTCClient = class extends bricks.VBox {
|
||||
url:bricks_resource('imgs/free_phone.png')
|
||||
},{
|
||||
state:'using',
|
||||
url:bricks_resource('img/using_phone.png')
|
||||
url:bricks_resource('imgs/using_phone.png')
|
||||
}
|
||||
],
|
||||
state:'free',
|
||||
@ -231,14 +231,16 @@ bricks.RTCClient = class extends bricks.VBox {
|
||||
console.log('offer branch exe');
|
||||
break;
|
||||
case 'answer':
|
||||
if (d.from == self.peer_info){
|
||||
console.log('answer: d.from=', d.from, 'peer_info=', self.peer_info);
|
||||
if (d.from.id == self.peer_info.id){
|
||||
var desc = new RTCSessionDescription(d.answer);
|
||||
await this.pc.setRemoteDescription(desc);
|
||||
console.log('answer branch exe');
|
||||
}
|
||||
break;
|
||||
case 'iceCandidate':
|
||||
if (d.from == self.peer_info){
|
||||
console.log('iceCandidate: d.from=', d.from, 'peer_info=', self.peer_info);
|
||||
if (d.from.id == self.peer_info.id){
|
||||
var candidate = new RTCIceCandidate(d.candidate);
|
||||
await this.pc.addIceCandidate(candidate);
|
||||
console.log('iceCandidate branch exe');
|
||||
|
Loading…
Reference in New Issue
Block a user