|
@@ -860,7 +860,11 @@ JingleSessionPC.prototype.sendTerminate = function (reason, text) {
|
860
|
860
|
}
|
861
|
861
|
};
|
862
|
862
|
|
863
|
|
-JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
|
863
|
+/**
|
|
864
|
+ * Handles a Jingle source-add message for this Jingle session.
|
|
865
|
+ * @param elem An array of Jingle "content" elements.
|
|
866
|
+ */
|
|
867
|
+JingleSessionPC.prototype.addSource = function (elem) {
|
864
|
868
|
|
865
|
869
|
var self = this;
|
866
|
870
|
// FIXME: dirty waiting
|
|
@@ -869,7 +873,7 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
869
|
873
|
logger.warn("addSource - localDescription not ready yet")
|
870
|
874
|
setTimeout(function()
|
871
|
875
|
{
|
872
|
|
- self.addSource(elem, fromJid);
|
|
876
|
+ self.addSource(elem);
|
873
|
877
|
},
|
874
|
878
|
200
|
875
|
879
|
);
|
|
@@ -942,16 +946,18 @@ JingleSessionPC.prototype.addSource = function (elem, fromJid) {
|
942
|
946
|
});
|
943
|
947
|
};
|
944
|
948
|
|
945
|
|
-JingleSessionPC.prototype.removeSource = function (elem, fromJid) {
|
|
949
|
+/**
|
|
950
|
+ * Handles a Jingle source-remove message for this Jingle session.
|
|
951
|
+ * @param elem An array of Jingle "content" elements.
|
|
952
|
+ */
|
|
953
|
+JingleSessionPC.prototype.removeSource = function (elem) {
|
946
|
954
|
|
947
|
955
|
var self = this;
|
948
|
956
|
// FIXME: dirty waiting
|
949
|
|
- if (!this.peerconnection.localDescription)
|
950
|
|
- {
|
951
|
|
- logger.warn("removeSource - localDescription not ready yet")
|
952
|
|
- setTimeout(function()
|
953
|
|
- {
|
954
|
|
- self.removeSource(elem, fromJid);
|
|
957
|
+ if (!this.peerconnection.localDescription) {
|
|
958
|
+ logger.warn("removeSource - localDescription not ready yet");
|
|
959
|
+ setTimeout(function() {
|
|
960
|
+ self.removeSource(elem);
|
955
|
961
|
},
|
956
|
962
|
200
|
957
|
963
|
);
|