Skip to content

Commit

Permalink
Merge pull request #263 from Sing-Li/master
Browse files Browse the repository at this point in the history
improve stability of callee #115
  • Loading branch information
rodrigok committed Jul 4, 2015
2 parents 46bead3 + e7e3511 commit 54b23dc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/rocketchat-webrtc/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ stream.on(Meteor.userId(), function(data) {
if (data.sdp) {
webrtc.pc.setRemoteDescription(new RTCSessionDescription(data.sdp));
} else {
webrtc.pc.addIceCandidate(new RTCIceCandidate(data.candidate));
if( ["closed", "failed", "disconnected", "completed"].indexOf(webrtc.pc.iceConnectionState) === -1)
{
webrtc.pc.addIceCandidate(new RTCIceCandidate(data.candidate));
}
}
});

0 comments on commit 54b23dc

Please sign in to comment.