diff --git a/src/RTCSession/RTCMediaHandler.js b/src/RTCSession/RTCMediaHandler.js index 6485503c0..81abe2a7b 100644 --- a/src/RTCSession/RTCMediaHandler.js +++ b/src/RTCSession/RTCMediaHandler.js @@ -30,7 +30,7 @@ RTCMediaHandler.prototype = { var self = this; function onSetLocalDescriptionSuccess() { - if (self.peerConnection.iceGatheringState === 'complete' && self.peerConnection.iceConnectionState === 'connected') { + if (self.peerConnection.iceGatheringState === 'complete' && (self.peerConnection.iceConnectionState === 'connected' || self.peerConnection.iceConnectionState === 'completed')) { self.ready = true; onSuccess(self.peerConnection.localDescription.sdp); } else { @@ -69,7 +69,7 @@ RTCMediaHandler.prototype = { var self = this; function onSetLocalDescriptionSuccess() { - if (self.peerConnection.iceGatheringState === 'complete' && self.peerConnection.iceConnectionState === 'connected') { + if (self.peerConnection.iceGatheringState === 'complete' && (self.peerConnection.iceConnectionState === 'connected' || self.peerConnection.iceConnectionState === 'completed')) { self.ready = true; onSuccess(self.peerConnection.localDescription.sdp); } else {