mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-23 23:19:23 -05:00
Better logging of ICE candidates and fail the call when ICE fails.
This commit is contained in:
parent
333e63156e
commit
83ea3c96ec
@ -280,14 +280,14 @@ angular.module('MatrixCall', [])
|
|||||||
};
|
};
|
||||||
|
|
||||||
MatrixCall.prototype.gotLocalIceCandidate = function(event) {
|
MatrixCall.prototype.gotLocalIceCandidate = function(event) {
|
||||||
console.log(event);
|
|
||||||
if (event.candidate) {
|
if (event.candidate) {
|
||||||
|
console.log("Got local ICE "+event.candidate.sdpMid+" candidate: "+event.candidate.candidate);
|
||||||
this.sendCandidate(event.candidate);
|
this.sendCandidate(event.candidate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixCall.prototype.gotRemoteIceCandidate = function(cand) {
|
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') {
|
if (this.state == 'ended') {
|
||||||
console.log("Ignoring remote ICE candidate because call has ended");
|
console.log("Ignoring remote ICE candidate because call has ended");
|
||||||
return;
|
return;
|
||||||
@ -368,6 +368,9 @@ angular.module('MatrixCall', [])
|
|||||||
self.state = 'connected';
|
self.state = 'connected';
|
||||||
self.didConnect = true;
|
self.didConnect = true;
|
||||||
});
|
});
|
||||||
|
} else if (this.peerConn.iceConnectionState == 'failed') {
|
||||||
|
this.hangupReason = 'ice_failed';
|
||||||
|
this.hangup();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -69,12 +69,13 @@
|
|||||||
<span ng-show="currentCall.state == 'ringing' && currentCall && currentCall.type == 'voice'">Incoming Voice Call</span>
|
<span ng-show="currentCall.state == 'ringing' && currentCall && currentCall.type == 'voice'">Incoming Voice Call</span>
|
||||||
<span ng-show="currentCall.state == 'connecting'">Call Connecting...</span>
|
<span ng-show="currentCall.state == 'connecting'">Call Connecting...</span>
|
||||||
<span ng-show="currentCall.state == 'connected'">Call Connected</span>
|
<span ng-show="currentCall.state == 'connected'">Call Connected</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'remote'">Call Rejected</span>
|
<span ng-show="currentCall.state == 'ended' && currentCall.hangupReason == 'ice_failed'">Media Connection Failed</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'local' && currentCall.hangupReason == undefined">Call Canceled</span>
|
<span ng-show="currentCall.state == 'ended' && !currentCall.hangupReason && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'remote'">Call Rejected</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'local' && currentCall.hangupReason == 'invite_timeout'">User Not Responding</span>
|
<span ng-show="currentCall.state == 'ended' && !currentCall.hangupReason && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'local'">Call Canceled</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && currentCall.didConnect && currentCall.direction == 'outbound'">Call Ended</span>
|
<span ng-show="currentCall.state == 'ended' && currentCall.hangupReason == 'invite_timeout' && !currentCall.didConnect && currentCall.direction == 'outbound' && currentCall.hangupParty == 'local'">User Not Responding</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && !currentCall.didConnect && currentCall.direction == 'inbound'">Call Canceled</span>
|
<span ng-show="currentCall.state == 'ended' && !currentCall.hangupReason && currentCall.didConnect && currentCall.direction == 'outbound'">Call Ended</span>
|
||||||
<span ng-show="currentCall.state == 'ended' && currentCall.didConnect && currentCall.direction == 'inbound'">Call Ended</span>
|
<span ng-show="currentCall.state == 'ended' && !currentCall.hangupReason && !currentCall.didConnect && currentCall.direction == 'inbound'">Call Canceled</span>
|
||||||
|
<span ng-show="currentCall.state == 'ended' && !currentCall.hangupReason && currentCall.didConnect && currentCall.direction == 'inbound'">Call Ended</span>
|
||||||
<span ng-show="currentCall.state == 'wait_local_media'">Waiting for media permission...</span>
|
<span ng-show="currentCall.state == 'wait_local_media'">Waiting for media permission...</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user