Add event handlers for iceConnection errors
This commit is contained in:
parent
04b98036e7
commit
3d74ad4847
@ -297,10 +297,21 @@ export default class SIPBridge extends BaseAudioBridge {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleConnectionTerminated = peer => this.callback({
|
||||||
|
status: this.baseCallStates.failed,
|
||||||
|
error: this.baseErrorCodes.CONNECTION_ERROR,
|
||||||
|
bridgeError: peer,
|
||||||
|
});
|
||||||
|
|
||||||
currentSession.on('terminated', handleSessionTerminated);
|
currentSession.on('terminated', handleSessionTerminated);
|
||||||
currentSession.mediaHandler.on('iceConnectionCompleted', handleConnectionCompleted);
|
currentSession.mediaHandler.on('iceConnectionCompleted', handleConnectionCompleted);
|
||||||
currentSession.mediaHandler.on('iceConnectionConnected', handleConnectionCompleted);
|
currentSession.mediaHandler.on('iceConnectionConnected', handleConnectionCompleted);
|
||||||
|
|
||||||
|
|
||||||
|
currentSession.mediaHandler.on('iceConnectionFailed', handleConnectionTerminated);
|
||||||
|
currentSession.mediaHandler.on('iceConnectionDisconnected', handleConnectionTerminated);
|
||||||
|
currentSession.mediaHandler.on('iceConnectionClosed', handleConnectionTerminated);
|
||||||
|
|
||||||
this.currentSession = currentSession;
|
this.currentSession = currentSession;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user