Browse Source

Make sure to handle iceConnectionState completed in addition to connected fixing conference connection issues when all ice candidates work.

pull/25/head
Simon Eisenmann 11 years ago
parent
commit
ce186c9168
  1. 4
      static/js/mediastream/peerconference.js
  2. 2
      static/js/mediastream/webrtc.js

4
static/js/mediastream/peerconference.js

@ -183,12 +183,16 @@ define(['underscore', 'mediastream/peercall'], function(_, PeerCall) { @@ -183,12 +183,16 @@ define(['underscore', 'mediastream/peercall'], function(_, PeerCall) {
console.log("Conference peer connection state changed", iceConnectionState, currentcall);
switch (iceConnectionState) {
case "completed":
case "connected":
if (!this.callsIn.hasOwnProperty(currentcall.id)) {
this.callsIn[currentcall.id] = true;
this.pushUpdate();
}
break;
case "failed":
console.warn("Conference peer connection state failed", currentcall);
break;
}
this.webrtc.onConnectionStateChange(iceConnectionState, currentcall);

2
static/js/mediastream/webrtc.js

@ -443,6 +443,7 @@ define([ @@ -443,6 +443,7 @@ define([
xfer.e.on("connectionStateChange", _.bind(function(event, iceConnectionState, currentxfer) {
console.log("Xfer state changed", iceConnectionState);
switch (iceConnectionState) {
case "completed":
case "connected":
// Do nothing here, we wait for dataReady.
break
@ -516,6 +517,7 @@ define([ @@ -516,6 +517,7 @@ define([
peerscreenshare.e.on("connectionStateChange", _.bind(function(event, iceConnectionState, currentscreenshare) {
console.log("Screen share state changed", iceConnectionState);
switch (iceConnectionState) {
case "completed":
case "connected":
opts.connected(currentscreenshare);
break

Loading…
Cancel
Save