Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fixes bugs in VideoSSRCHack. Additional log messages.

paweldomas95e964a08972
diff --git a/modules/xmpp/JingleSession.js b/modules/xmpp/JingleSession.js
index 5b02be580b..4179dc13eb 100644
--- a/modules/xmpp/JingleSession.js
+++ b/modules/xmpp/JingleSession.js
@@ -1138,6 +1138,7 @@ JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {
remove = VideoSSRCHack.processSourceRemove(remove);
if (removed && remove) {
+ console.info("Sending source-remove", remove);
this.connection.sendIQ(remove,
function (res) {
console.info('got remove result', res);
@@ -1167,7 +1168,8 @@ JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {
if (added)
add = VideoSSRCHack.processSourceAdd(add);
- if (added & add) {
+ if (added && add) {
+ console.info("Sending source-add", add);
this.connection.sendIQ(add,
function (res) {
console.info('got add result', res);
diff --git a/modules/xmpp/VideoSSRCHack.js b/modules/xmpp/VideoSSRCHack.js
index 9e28d82d92..5628733591 100644
--- a/modules/xmpp/VideoSSRCHack.js
+++ b/modules/xmpp/VideoSSRCHack.js
@@ -36,16 +36,17 @@ var localVideoSSRC;
* other SSRCs left to be signaled after removing it.
*/
var filterOutSource = function (modifyIq, actionName) {
+ var modifyIqTree = $(modifyIq.tree());
+
if (!localVideoSSRC)
- return modifyIq;
+ return modifyIqTree[0];
- var modifyIqTree = $(modifyIq.tree());
var videoSSRC = modifyIqTree.find(
'>jingle>content[name="video"]' +
'>description>source[ssrc="' + localVideoSSRC + '"]');
if (!videoSSRC.length) {
- return modifyIqTree;
+ return modifyIqTree[0];
}
console.info(
@@ -55,7 +56,7 @@ var filterOutSource = function (modifyIq, actionName) {
// Check if any sources still left to be added/removed
if (modifyIqTree.find('>jingle>content>description>source').length) {
- return modifyIqTree;
+ return modifyIqTree[0];
} else {
return null;
}