mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
Better logging of ICE candidates and fail the call when ICE fails.
This commit is contained in:
parent
333e63156e
commit
83ea3c96ec
2 changed files with 12 additions and 8 deletions
|
@ -280,14 +280,14 @@ angular.module('MatrixCall', [])
|
|||
};
|
||||
|
||||
MatrixCall.prototype.gotLocalIceCandidate = function(event) {
|
||||
console.log(event);
|
||||
if (event.candidate) {
|
||||
console.log("Got local ICE "+event.candidate.sdpMid+" candidate: "+event.candidate.candidate);
|
||||
this.sendCandidate(event.candidate);
|
||||
}
|
||||
}
|
||||
|
||||
MatrixCall.prototype.gotRemoteIceCandidate = function(cand) {
|
||||
console.log("Got ICE candidate from remote: "+cand);
|
||||
console.log("Got remote ICE "+cand.sdpMid+" candidate: "+cand.candidate);
|
||||
if (this.state == 'ended') {
|
||||
console.log("Ignoring remote ICE candidate because call has ended");
|
||||
return;
|
||||
|
@ -368,6 +368,9 @@ angular.module('MatrixCall', [])
|
|||
self.state = 'connected';
|
||||
self.didConnect = true;
|
||||
});
|
||||
} else if (this.peerConn.iceConnectionState == 'failed') {
|
||||
this.hangupReason = 'ice_failed';
|
||||
this.hangup();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue