|
@@ -766,6 +766,19 @@ ColibriFocus.prototype.sendSSRCUpdate = function (sdpMediaSsrcs, fromJid, isadd)
|
766
|
766
|
ColibriFocus.prototype.addSource = function (elem, fromJid) {
|
767
|
767
|
|
768
|
768
|
var self = this;
|
|
769
|
+ // FIXME: dirty waiting
|
|
770
|
+ if (!this.peerconnection.localDescription)
|
|
771
|
+ {
|
|
772
|
+ console.warn("addSource - localDescription not ready yet")
|
|
773
|
+ setTimeout(function()
|
|
774
|
+ {
|
|
775
|
+ self.addSource(elem, fromJid);
|
|
776
|
+ },
|
|
777
|
+ 200
|
|
778
|
+ );
|
|
779
|
+ return;
|
|
780
|
+ }
|
|
781
|
+
|
769
|
782
|
this.peerconnection.addSource(elem);
|
770
|
783
|
|
771
|
784
|
var peerSsrc = this.remotessrc[fromJid];
|
|
@@ -799,6 +812,19 @@ ColibriFocus.prototype.addSource = function (elem, fromJid) {
|
799
|
812
|
ColibriFocus.prototype.removeSource = function (elem, fromJid) {
|
800
|
813
|
|
801
|
814
|
var self = this;
|
|
815
|
+ // FIXME: dirty waiting
|
|
816
|
+ if (!self.peerconnection.localDescription)
|
|
817
|
+ {
|
|
818
|
+ console.warn("removeSource - localDescription not ready yet");
|
|
819
|
+ setTimeout(function()
|
|
820
|
+ {
|
|
821
|
+ self.removeSource(elem, fromJid);
|
|
822
|
+ },
|
|
823
|
+ 200
|
|
824
|
+ );
|
|
825
|
+ return;
|
|
826
|
+ }
|
|
827
|
+
|
802
|
828
|
this.peerconnection.removeSource(elem);
|
803
|
829
|
|
804
|
830
|
var peerSsrc = this.remotessrc[fromJid];
|