Changes the order in which SSRCs from the bridge and those from other
participants are added. This causes the not-rendered "mixed" SSRC from the bridge to appear first in session-initiate, and thus to appear first in participants' remote description.
This commit is contained in:
parent
ea93bc6f41
commit
d976bfaa30
|
@ -689,26 +689,8 @@ ColibriFocus.prototype.initiate = function (peer, isInitiator) {
|
|||
sdp.removeMediaLines(i, 'a=ice-pwd:');
|
||||
sdp.removeMediaLines(i, 'a=fingerprint:');
|
||||
sdp.removeMediaLines(i, 'a=setup:');
|
||||
|
||||
if (1) { //i > 0) { // not for audio FIXME: does not work as intended
|
||||
// re-add all remote a=ssrcs _and_ a=ssrc-group
|
||||
for (var jid in this.remotessrc) {
|
||||
if (jid == peer || !this.remotessrc[jid][i])
|
||||
continue;
|
||||
sdp.media[i] += this.remotessrc[jid][i];
|
||||
}
|
||||
|
||||
// add local a=ssrc-group: lines
|
||||
lines = SDPUtil.find_lines(localSDP.media[i], 'a=ssrc-group:');
|
||||
if (lines.length != 0)
|
||||
sdp.media[i] += lines.join('\r\n') + '\r\n';
|
||||
|
||||
// and local a=ssrc: lines
|
||||
sdp.media[i] += SDPUtil.find_lines(localSDP.media[i], 'a=ssrc:').join('\r\n') + '\r\n';
|
||||
}
|
||||
}
|
||||
sdp.raw = sdp.session + sdp.media.join('');
|
||||
|
||||
// add stuff we got from the bridge
|
||||
for (var j = 0; j < sdp.media.length; j++) {
|
||||
var chan = $(this.channels[participant][j]);
|
||||
|
@ -756,6 +738,25 @@ ColibriFocus.prototype.initiate = function (peer, isInitiator) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < sdp.media.length; i++) {
|
||||
// re-add all remote a=ssrcs _and_ a=ssrc-group
|
||||
for (var jid in this.remotessrc) {
|
||||
if (jid == peer || !this.remotessrc[jid][i])
|
||||
continue;
|
||||
sdp.media[i] += this.remotessrc[jid][i];
|
||||
}
|
||||
|
||||
// add local a=ssrc-group: lines
|
||||
lines = SDPUtil.find_lines(localSDP.media[i], 'a=ssrc-group:');
|
||||
if (lines.length != 0)
|
||||
sdp.media[i] += lines.join('\r\n') + '\r\n';
|
||||
|
||||
// and local a=ssrc: lines
|
||||
sdp.media[i] += SDPUtil.find_lines(localSDP.media[i], 'a=ssrc:').join('\r\n') + '\r\n';
|
||||
}
|
||||
sdp.raw = sdp.session + sdp.media.join('');
|
||||
|
||||
// make a new colibri session and configure it
|
||||
// FIXME: is it correct to use this.connection.jid when used in a MUC?
|
||||
var sess = new ColibriSession(this.connection.jid,
|
||||
|
|
Loading…
Reference in New Issue