|
|
|
|
|
|
540
|
if (1) { //i > 0) { // not for audio FIXME: does not work as intended
|
540
|
if (1) { //i > 0) { // not for audio FIXME: does not work as intended
|
|
541
|
// re-add all remote a=ssrcs
|
541
|
// re-add all remote a=ssrcs
|
|
542
|
for (var jid in this.remotessrc) {
|
542
|
for (var jid in this.remotessrc) {
|
|
543
|
- if (jid == peer) continue;
|
|
|
|
|
|
543
|
+ if (jid == peer || !this.remotessrc[jid][i])
|
|
|
|
544
|
+ continue;
|
|
544
|
sdp.media[i] += this.remotessrc[jid][i];
|
545
|
sdp.media[i] += this.remotessrc[jid][i];
|
|
545
|
}
|
546
|
}
|
|
546
|
// and local a=ssrc lines
|
547
|
// and local a=ssrc lines
|
|
|
|
|
|
|
714
|
change.c('conference', {xmlns: 'http://jitsi.org/protocol/colibri', id: this.confid});
|
715
|
change.c('conference', {xmlns: 'http://jitsi.org/protocol/colibri', id: this.confid});
|
|
715
|
for (channel = 0; channel < this.channels[participant].length; channel++)
|
716
|
for (channel = 0; channel < this.channels[participant].length; channel++)
|
|
716
|
{
|
717
|
{
|
|
|
|
718
|
+ if (!remoteSDP.media[channel])
|
|
|
|
719
|
+ continue;
|
|
|
|
720
|
+
|
|
717
|
var name = SDPUtil.parse_mid(SDPUtil.find_line(remoteSDP.media[channel], 'a=mid:'));
|
721
|
var name = SDPUtil.parse_mid(SDPUtil.find_line(remoteSDP.media[channel], 'a=mid:'));
|
|
718
|
change.c('content', {name: name});
|
722
|
change.c('content', {name: name});
|
|
719
|
if (name !== 'data')
|
723
|
if (name !== 'data')
|
|
|
|
|
|
|
894
|
this.remotessrc[session.peerjid] = [];
|
898
|
this.remotessrc[session.peerjid] = [];
|
|
895
|
for (channel = 0; channel < this.channels[participant].length; channel++) {
|
899
|
for (channel = 0; channel < this.channels[participant].length; channel++) {
|
|
896
|
//if (channel == 0) continue; FIXME: does not work as intended
|
900
|
//if (channel == 0) continue; FIXME: does not work as intended
|
|
|
|
901
|
+ if (!remoteSDP.media[channel])
|
|
|
|
902
|
+ continue;
|
|
|
|
903
|
+
|
|
897
|
if (SDPUtil.find_lines(remoteSDP.media[channel], 'a=ssrc:').length)
|
904
|
if (SDPUtil.find_lines(remoteSDP.media[channel], 'a=ssrc:').length)
|
|
898
|
{
|
905
|
{
|
|
899
|
this.remotessrc[session.peerjid][channel] =
|
906
|
this.remotessrc[session.peerjid][channel] =
|
|
|
|
|
|
|
905
|
// ACT 4: add new a=ssrc lines to local remotedescription
|
912
|
// ACT 4: add new a=ssrc lines to local remotedescription
|
|
906
|
for (channel = 0; channel < this.channels[participant].length; channel++) {
|
913
|
for (channel = 0; channel < this.channels[participant].length; channel++) {
|
|
907
|
//if (channel == 0) continue; FIXME: does not work as intended
|
914
|
//if (channel == 0) continue; FIXME: does not work as intended
|
|
|
|
915
|
+ if (!remoteSDP.media[channel])
|
|
|
|
916
|
+ continue;
|
|
|
|
917
|
+
|
|
908
|
if (SDPUtil.find_lines(remoteSDP.media[channel], 'a=ssrc:').length) {
|
918
|
if (SDPUtil.find_lines(remoteSDP.media[channel], 'a=ssrc:').length) {
|
|
909
|
this.peerconnection.enqueueAddSsrc(
|
919
|
this.peerconnection.enqueueAddSsrc(
|
|
910
|
channel,
|
920
|
channel,
|