|
|
@@ -943,6 +943,11 @@ JingleSessionPC.prototype.addStream = function (stream, callback, ssrcInfo,
|
|
943
|
943
|
return;
|
|
944
|
944
|
}
|
|
945
|
945
|
|
|
|
946
|
+ if(this.modifySourcesQueue.paused) {
|
|
|
947
|
+ throw new Error("modifySourcesQueue paused");
|
|
|
948
|
+ return;
|
|
|
949
|
+ }
|
|
|
950
|
+
|
|
946
|
951
|
this.modifyingLocalStreams = true;
|
|
947
|
952
|
var self = this;
|
|
948
|
953
|
this.modifySourcesQueue.push(function() {
|
|
|
@@ -985,8 +990,10 @@ JingleSessionPC.prototype.removeStream = function (stream, callback, ssrcInfo) {
|
|
985
|
990
|
}
|
|
986
|
991
|
if (RTCBrowserType.getBrowserType() ===
|
|
987
|
992
|
RTCBrowserType.RTC_BROWSER_FIREFOX) {
|
|
988
|
|
- if(!stream)//There is nothing to be changed
|
|
|
993
|
+ if(!stream) {//There is nothing to be changed
|
|
|
994
|
+ callback();
|
|
989
|
995
|
return;
|
|
|
996
|
+ }
|
|
990
|
997
|
var sender = null;
|
|
991
|
998
|
// On Firefox we don't replace MediaStreams as this messes up the
|
|
992
|
999
|
// m-lines (which can't be removed in Plan Unified) and brings a lot
|
|
|
@@ -1002,6 +1009,7 @@ JingleSessionPC.prototype.removeStream = function (stream, callback, ssrcInfo) {
|
|
1002
|
1009
|
|
|
1003
|
1010
|
if(!track) {
|
|
1004
|
1011
|
logger.log("Cannot remove tracks: no tracks.");
|
|
|
1012
|
+ callback();
|
|
1005
|
1013
|
return;
|
|
1006
|
1014
|
}
|
|
1007
|
1015
|
|
|
|
@@ -1032,6 +1040,11 @@ JingleSessionPC.prototype.removeStream = function (stream, callback, ssrcInfo) {
|
|
1032
|
1040
|
return;
|
|
1033
|
1041
|
}
|
|
1034
|
1042
|
|
|
|
1043
|
+ if(this.modifySourcesQueue.paused) {
|
|
|
1044
|
+ throw new Error("modifySourcesQueue paused");
|
|
|
1045
|
+ return;
|
|
|
1046
|
+ }
|
|
|
1047
|
+
|
|
1035
|
1048
|
this.modifyingLocalStreams = true;
|
|
1036
|
1049
|
var self = this;
|
|
1037
|
1050
|
this.modifySourcesQueue.push(function() {
|