Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/WebRTC/MediaHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ var MediaHandler = function(session, options) {
'userMediaFailed',
'iceGathering',
'iceComplete',
'iceGatheringComplete',
'iceFailed',
'iceDisconnected',
'iceClosed',
'iceCompleted',
'getDescription',
'setDescription',
'dataChannel',
Expand Down Expand Up @@ -75,6 +77,7 @@ var MediaHandler = function(session, options) {
this.onIceCompleted.promise.then(function(pc) {
self.logger.log('ICE Gathering Completed');
self.emit('iceComplete', pc);
self.emit('iceGatheringComplete', pc);
});

this.peerConnection = new SIP.WebRTC.RTCPeerConnection({'iceServers': servers}, this.RTCConstraints);
Expand Down Expand Up @@ -122,6 +125,10 @@ var MediaHandler = function(session, options) {
self.emit('iceClosed', this);
}

if (this.iceConnectionState === 'completed') {
self.emit('iceCompleted', this);
}

//Bria state changes are always connected -> disconnected -> connected on accept, so session gets terminated
//normal calls switch from failed to connected in some cases, so checking for failed and terminated
/*if (this.iceConnectionState === 'failed') {
Expand Down