Fixes audio-only (when GUM fails)

This commit is contained in:
Zalmoxisus 2015-01-26 19:54:26 +02:00
parent 567ac23c2c
commit 40de181959
4 changed files with 18 additions and 10 deletions

View File

@ -700,7 +700,9 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid
} }
} }
setResolutionConstraints(constraints, resolution, isAndroid); if (um.indexOf('video') >= 0) {
setResolutionConstraints(constraints, resolution, isAndroid);
}
if (bandwidth) { // doesn't work currently, see webrtc issue 1846 if (bandwidth) { // doesn't work currently, see webrtc issue 1846
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

View File

@ -380,10 +380,12 @@ NativeSimulcastSender.prototype._appendSimulcastGroup = function (lines) {
simSSRC = this._generateRandomSSRC(); simSSRC = this._generateRandomSSRC();
ssrcGroup.push(simSSRC); ssrcGroup.push(simSSRC);
sb.splice.apply(sb, [sb.length, 0].concat( if (videoSources.base) {
[["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''), sb.splice.apply(sb, [sb.length, 0].concat(
["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')] [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
)); ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
));
}
this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join('')); this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join(''));

View File

@ -115,7 +115,9 @@ function getConstraints(um, resolution, bandwidth, fps, desktopStream, isAndroid
} }
} }
setResolutionConstraints(constraints, resolution, isAndroid); if (um.indexOf('video') >= 0) {
setResolutionConstraints(constraints, resolution, isAndroid);
}
if (bandwidth) { // doesn't work currently, see webrtc issue 1846 if (bandwidth) { // doesn't work currently, see webrtc issue 1846
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true

View File

@ -78,10 +78,12 @@ NativeSimulcastSender.prototype._appendSimulcastGroup = function (lines) {
simSSRC = this._generateRandomSSRC(); simSSRC = this._generateRandomSSRC();
ssrcGroup.push(simSSRC); ssrcGroup.push(simSSRC);
sb.splice.apply(sb, [sb.length, 0].concat( if (videoSources.base) {
[["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''), sb.splice.apply(sb, [sb.length, 0].concat(
["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')] [["a=ssrc:", simSSRC, " cname:", videoSources.base.cname].join(''),
)); ["a=ssrc:", simSSRC, " msid:", videoSources.base.msid].join('')]
));
}
this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join('')); this.logger.info(['Generated substream ', i, ' with SSRC ', simSSRC, '.'].join(''));