Skip to content
Snippets Groups Projects
Commit 54b23dcb authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Merge pull request #263 from Sing-Li/master

improve stability of callee #115
parents 46bead3d e7e3511a
No related branches found
No related tags found
No related merge requests found
......@@ -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));
}
}
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment