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);
|
remove = VideoSSRCHack.processSourceRemove(remove);
|
||||||
|
|
||||||
if (removed && remove) {
|
if (removed && remove) {
|
||||||
|
console.info("Sending source-remove", remove);
|
||||||
this.connection.sendIQ(remove,
|
this.connection.sendIQ(remove,
|
||||||
function (res) {
|
function (res) {
|
||||||
console.info('got remove result', res);
|
console.info('got remove result', res);
|
||||||
|
@ -1167,7 +1168,8 @@ JingleSession.prototype.notifyMySSRCUpdate = function (old_sdp, new_sdp) {
|
||||||
if (added)
|
if (added)
|
||||||
add = VideoSSRCHack.processSourceAdd(add);
|
add = VideoSSRCHack.processSourceAdd(add);
|
||||||
|
|
||||||
if (added & add) {
|
if (added && add) {
|
||||||
|
console.info("Sending source-add", add);
|
||||||
this.connection.sendIQ(add,
|
this.connection.sendIQ(add,
|
||||||
function (res) {
|
function (res) {
|
||||||
console.info('got add result', res);
|
console.info('got add result', res);
|
||||||
|
|
|
@ -36,16 +36,17 @@ var localVideoSSRC;
|
||||||
* other SSRCs left to be signaled after removing it.
|
* other SSRCs left to be signaled after removing it.
|
||||||
*/
|
*/
|
||||||
var filterOutSource = function (modifyIq, actionName) {
|
var filterOutSource = function (modifyIq, actionName) {
|
||||||
if (!localVideoSSRC)
|
|
||||||
return modifyIq;
|
|
||||||
|
|
||||||
var modifyIqTree = $(modifyIq.tree());
|
var modifyIqTree = $(modifyIq.tree());
|
||||||
|
|
||||||
|
if (!localVideoSSRC)
|
||||||
|
return modifyIqTree[0];
|
||||||
|
|
||||||
var videoSSRC = modifyIqTree.find(
|
var videoSSRC = modifyIqTree.find(
|
||||||
'>jingle>content[name="video"]' +
|
'>jingle>content[name="video"]' +
|
||||||
'>description>source[ssrc="' + localVideoSSRC + '"]');
|
'>description>source[ssrc="' + localVideoSSRC + '"]');
|
||||||
|
|
||||||
if (!videoSSRC.length) {
|
if (!videoSSRC.length) {
|
||||||
return modifyIqTree;
|
return modifyIqTree[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
console.info(
|
console.info(
|
||||||
|
@ -55,7 +56,7 @@ var filterOutSource = function (modifyIq, actionName) {
|
||||||
|
|
||||||
// Check if any sources still left to be added/removed
|
// Check if any sources still left to be added/removed
|
||||||
if (modifyIqTree.find('>jingle>content>description>source').length) {
|
if (modifyIqTree.find('>jingle>content>description>source').length) {
|
||||||
return modifyIqTree;
|
return modifyIqTree[0];
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue