Fixes bugs in VideoSSRCHack. Additional log messages.
This commit is contained in:
parent
c288aa6e84
commit
95e964a089
|
@ -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);
|
||||
|
|
|
@ -36,16 +36,17 @@ var localVideoSSRC;
|
|||
* other SSRCs left to be signaled after removing it.
|
||||
*/
|
||||
var filterOutSource = function (modifyIq, actionName) {
|
||||
if (!localVideoSSRC)
|
||||
return modifyIq;
|
||||
|
||||
var modifyIqTree = $(modifyIq.tree());
|
||||
|
||||
if (!localVideoSSRC)
|
||||
return modifyIqTree[0];
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue