bugfix
This commit is contained in:
parent
98eef3e239
commit
1bd3db21d3
@ -325,6 +325,7 @@ bricks.RTCP2PConnect = class {
|
|||||||
|
|
||||||
async connection_statechange(peer, event){
|
async connection_statechange(peer, event){
|
||||||
var pc = this.peers[peer.id].pc;
|
var pc = this.peers[peer.id].pc;
|
||||||
|
console.log(`${peer.id} state changed. new state=${pc.connectionState}`);
|
||||||
if (pc.connectionState == 'disconnected'){
|
if (pc.connectionState == 'disconnected'){
|
||||||
var w = new bricks.Error({
|
var w = new bricks.Error({
|
||||||
title:'Error',
|
title:'Error',
|
||||||
@ -341,7 +342,6 @@ bricks.RTCP2PConnect = class {
|
|||||||
await this.createDataChannel(peer);
|
await this.createDataChannel(peer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(`${peer.id} connect losed. ${pc.connectionState}`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -376,6 +376,7 @@ bricks.RTCP2PConnect = class {
|
|||||||
const configuration = {
|
const configuration = {
|
||||||
iceServers:this.opts.ice_servers
|
iceServers:this.opts.ice_servers
|
||||||
}
|
}
|
||||||
|
console.log('RTCPC configuration=', configuration);
|
||||||
var pc = new RTCPeerConnection(configuration);
|
var pc = new RTCPeerConnection(configuration);
|
||||||
if (this.local_stream){
|
if (this.local_stream){
|
||||||
this.local_stream.getTracks()
|
this.local_stream.getTracks()
|
||||||
|
Loading…
Reference in New Issue
Block a user