Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
6fb65e58d4
|
@ -15,5 +15,6 @@ var config = {
|
||||||
enableRtpStats: true, // Enables RTP stats processing
|
enableRtpStats: true, // Enables RTP stats processing
|
||||||
openSctp: true, // Toggle to enable/disable SCTP channels
|
openSctp: true, // Toggle to enable/disable SCTP channels
|
||||||
// channelLastN: -1, // The default value of the channel attribute last-n.
|
// channelLastN: -1, // The default value of the channel attribute last-n.
|
||||||
|
// useRtcpMux: true,
|
||||||
enableRecording: false
|
enableRecording: false
|
||||||
};
|
};
|
||||||
|
|
|
@ -303,6 +303,9 @@ ColibriFocus.prototype._makeConference = function () {
|
||||||
|
|
||||||
elem.c(elemName, elemAttrs);
|
elem.c(elemName, elemAttrs);
|
||||||
elem.attrs({ endpoint: peer.substr(1 + peer.lastIndexOf('/')) });
|
elem.attrs({ endpoint: peer.substr(1 + peer.lastIndexOf('/')) });
|
||||||
|
if ('channel' === elemName && config.useRtcpMux) {
|
||||||
|
elem.c('rtcp-mux').up();
|
||||||
|
}
|
||||||
elem.up(); // end of channel/sctpconnection
|
elem.up(); // end of channel/sctpconnection
|
||||||
}
|
}
|
||||||
elem.up(); // end of content
|
elem.up(); // end of content
|
||||||
|
@ -407,6 +410,7 @@ ColibriFocus.prototype.createdConference = function (result) {
|
||||||
'a=rtpmap:13 CN/8000\r\n' +
|
'a=rtpmap:13 CN/8000\r\n' +
|
||||||
'a=rtpmap:126 telephone-event/8000\r\n' +
|
'a=rtpmap:126 telephone-event/8000\r\n' +
|
||||||
'a=maxptime:60\r\n' +
|
'a=maxptime:60\r\n' +
|
||||||
|
(config.useRtcpMux ? 'a=rtcp-mux\r\n' : '') +
|
||||||
/* Video */
|
/* Video */
|
||||||
'm=video 1 RTP/SAVPF 100 116 117\r\n' +
|
'm=video 1 RTP/SAVPF 100 116 117\r\n' +
|
||||||
'c=IN IP4 0.0.0.0\r\n' +
|
'c=IN IP4 0.0.0.0\r\n' +
|
||||||
|
@ -421,6 +425,7 @@ ColibriFocus.prototype.createdConference = function (result) {
|
||||||
'a=rtcp-fb:100 goog-remb\r\n' +
|
'a=rtcp-fb:100 goog-remb\r\n' +
|
||||||
'a=rtpmap:116 red/90000\r\n' +
|
'a=rtpmap:116 red/90000\r\n' +
|
||||||
'a=rtpmap:117 ulpfec/90000\r\n' +
|
'a=rtpmap:117 ulpfec/90000\r\n' +
|
||||||
|
(config.useRtcpMux ? 'a=rtcp-mux\r\n' : '') +
|
||||||
/* Data SCTP */
|
/* Data SCTP */
|
||||||
(config.openSctp ?
|
(config.openSctp ?
|
||||||
'm=application 1 DTLS/SCTP 5000\r\n' +
|
'm=application 1 DTLS/SCTP 5000\r\n' +
|
||||||
|
@ -617,7 +622,9 @@ ColibriFocus.prototype.initiate = function (peer, isInitiator) {
|
||||||
sdp.removeSessionLines('a=group:');
|
sdp.removeSessionLines('a=group:');
|
||||||
sdp.removeSessionLines('a=msid-semantic:'); // FIXME: not mapped over jingle anyway...
|
sdp.removeSessionLines('a=msid-semantic:'); // FIXME: not mapped over jingle anyway...
|
||||||
for (var i = 0; i < sdp.media.length; i++) {
|
for (var i = 0; i < sdp.media.length; i++) {
|
||||||
sdp.removeMediaLines(i, 'a=rtcp-mux');
|
if (!config.useRtcpMux){
|
||||||
|
sdp.removeMediaLines(i, 'a=rtcp-mux');
|
||||||
|
}
|
||||||
sdp.removeMediaLines(i, 'a=ssrc:');
|
sdp.removeMediaLines(i, 'a=ssrc:');
|
||||||
sdp.removeMediaLines(i, 'a=crypto:');
|
sdp.removeMediaLines(i, 'a=crypto:');
|
||||||
sdp.removeMediaLines(i, 'a=candidate:');
|
sdp.removeMediaLines(i, 'a=candidate:');
|
||||||
|
@ -774,6 +781,9 @@ ColibriFocus.prototype.addNewParticipant = function (peer) {
|
||||||
|
|
||||||
elem.c('content', { name: name });
|
elem.c('content', { name: name });
|
||||||
elem.c(elemName, elemAttrs);
|
elem.c(elemName, elemAttrs);
|
||||||
|
if ('channel' === elemName && config.useRtcpMux) {
|
||||||
|
elem.c('rtcp-mux').up();
|
||||||
|
}
|
||||||
elem.up(); // end of channel/sctpconnection
|
elem.up(); // end of channel/sctpconnection
|
||||||
elem.up(); // end of content
|
elem.up(); // end of content
|
||||||
});
|
});
|
||||||
|
@ -821,6 +831,9 @@ ColibriFocus.prototype.updateChannel = function (remoteSDP, participant) {
|
||||||
endpoint: $(this.channels[participant][channel]).attr('endpoint'),
|
endpoint: $(this.channels[participant][channel]).attr('endpoint'),
|
||||||
expire: self.channelExpire
|
expire: self.channelExpire
|
||||||
});
|
});
|
||||||
|
if (config.useRtcpMux) {
|
||||||
|
change.c('rtcp-mux').up();
|
||||||
|
}
|
||||||
|
|
||||||
var rtpmap = SDPUtil.find_lines(remoteSDP.media[channel], 'a=rtpmap:');
|
var rtpmap = SDPUtil.find_lines(remoteSDP.media[channel], 'a=rtpmap:');
|
||||||
rtpmap.forEach(function (val) {
|
rtpmap.forEach(function (val) {
|
||||||
|
@ -1031,6 +1044,10 @@ ColibriFocus.prototype.addIceCandidate = function (session, elem) {
|
||||||
endpoint: $(self.channels[participant][channel]).attr('endpoint'),
|
endpoint: $(self.channels[participant][channel]).attr('endpoint'),
|
||||||
expire: self.channelExpire
|
expire: self.channelExpire
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (config.useRtcpMux) {
|
||||||
|
change.c('rtcp-mux').up();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1114,6 +1131,10 @@ ColibriFocus.prototype.sendIceCandidates = function (candidates) {
|
||||||
endpoint: $(this.mychannel[cands[0].sdpMLineIndex]).attr('endpoint'),
|
endpoint: $(this.mychannel[cands[0].sdpMLineIndex]).attr('endpoint'),
|
||||||
expire: self.channelExpire
|
expire: self.channelExpire
|
||||||
});
|
});
|
||||||
|
if (config.useRtcpMux) {
|
||||||
|
mycands.c('rtcp-mux').up();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -513,7 +513,7 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
||||||
constraints.video = { mandatory: {}, optional: [] };// same behaviour as true
|
constraints.video = { mandatory: {}, optional: [] };// same behaviour as true
|
||||||
}
|
}
|
||||||
if (um.indexOf('audio') >= 0) {
|
if (um.indexOf('audio') >= 0) {
|
||||||
constraints.audio = {};// same behaviour as true
|
constraints.audio = { mandatory: {}, optional: []};// same behaviour as true
|
||||||
}
|
}
|
||||||
if (um.indexOf('screen') >= 0) {
|
if (um.indexOf('screen') >= 0) {
|
||||||
constraints.video = {
|
constraints.video = {
|
||||||
|
@ -541,6 +541,29 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (constraints.audio) {
|
||||||
|
// if it is good enough for hangouts...
|
||||||
|
constraints.audio.optional.push(
|
||||||
|
{googEchoCancellation: true},
|
||||||
|
{googAutoGainControl: true},
|
||||||
|
{googNoiseSupression: true},
|
||||||
|
{googHighpassFilter: true},
|
||||||
|
{googNoisesuppression2: true},
|
||||||
|
{googEchoCancellation2: true},
|
||||||
|
{googAutoGainControl2: true}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (constraints.video) {
|
||||||
|
constraints.video.optional.push(
|
||||||
|
{googNoiseReduction: true}
|
||||||
|
);
|
||||||
|
if (um.indexOf('video') >= 0) {
|
||||||
|
constraints.video.optional.push(
|
||||||
|
{googLeakyBucket: true}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we are running on Android device
|
// Check if we are running on Android device
|
||||||
var isAndroid = navigator.userAgent.indexOf('Android') != -1;
|
var isAndroid = navigator.userAgent.indexOf('Android') != -1;
|
||||||
|
|
||||||
|
@ -596,12 +619,12 @@ function getUserMediaWithConstraints(um, success_callback, failure_callback, res
|
||||||
}
|
}
|
||||||
|
|
||||||
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: {}};//same behaviour as true
|
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};//same behaviour as true
|
||||||
constraints.video.optional = [{bandwidth: bandwidth}];
|
constraints.video.optional.push({bandwidth: bandwidth});
|
||||||
}
|
}
|
||||||
if (fps) { // for some cameras it might be necessary to request 30fps
|
if (fps) { // for some cameras it might be necessary to request 30fps
|
||||||
// so they choose 30fps mjpg over 10fps yuy2
|
// so they choose 30fps mjpg over 10fps yuy2
|
||||||
if (!constraints.video) constraints.video = {mandatory: {}};// same behaviour as tru;
|
if (!constraints.video) constraints.video = {mandatory: {}, optional: []};// same behaviour as true;
|
||||||
constraints.video.mandatory.minFrameRate = fps;
|
constraints.video.mandatory.minFrameRate = fps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue