Browse Source

Fixed broken hangup for regular conference calls.

pull/284/head
Joachim Bauch 9 years ago
parent
commit
a1696e0cdf
  1. 8
      static/js/mediastream/peerconference.js
  2. 2
      static/js/mediastream/webrtc.js

8
static/js/mediastream/peerconference.js

@ -59,7 +59,7 @@ define(['jquery', 'underscore', 'mediastream/peercall'], function($, _, PeerCall
}; };
PeerConference.prototype.checkEmpty = function() { PeerConference.prototype.checkEmpty = function() {
if (!_.isEmpty(this.calls)) { if (!_.isEmpty(this.calls) || (this.currentcall && this.currentcall.id)) {
return false; return false;
} }
@ -261,7 +261,11 @@ define(['jquery', 'underscore', 'mediastream/peercall'], function($, _, PeerCall
PeerConference.prototype.peerIds = function() { PeerConference.prototype.peerIds = function() {
return _.keys(this.calls); var result = _.keys(this.calls);
if (this.currentcall && this.currentcall.id && result.indexOf(this.currentcall.id) === -1) {
result.push(this.currentcall.id);
}
return result;
}; };

2
static/js/mediastream/webrtc.js

@ -373,6 +373,8 @@ function($, _, PeerCall, PeerConference, PeerXfer, PeerScreenshare, UserMedia, u
if (newcurrentcall && newcurrentcall != this.currentcall) { if (newcurrentcall && newcurrentcall != this.currentcall) {
this.currentcall = newcurrentcall; this.currentcall = newcurrentcall;
this.e.triggerHandler("peercall", [newcurrentcall]); this.e.triggerHandler("peercall", [newcurrentcall]);
} else if (!newcurrentcall) {
this.doHangup("receivedbye", targetcall.id);
} }
if (this.currentconference && !this.currentconference.checkEmpty()) { if (this.currentconference && !this.currentconference.checkEmpty()) {
this.e.triggerHandler("peerconference", [this.currentconference]); this.e.triggerHandler("peerconference", [this.currentconference]);

Loading…
Cancel
Save