Adds an option to enable adaptive-last-n.
This commit is contained in:
@@ -20,6 +20,7 @@ var config = {
|
||||
enableRtpStats: true, // Enables RTP stats processing
|
||||
openSctp: true, // Toggle to enable/disable SCTP channels
|
||||
channelLastN: -1, // The default value of the channel attribute last-n.
|
||||
adaptiveLastN: false,
|
||||
useRtcpMux: true,
|
||||
useBundle: true,
|
||||
enableRecording: false,
|
||||
|
||||
@@ -292,8 +292,14 @@ ColibriFocus.prototype._makeConference = function (errorCallback) {
|
||||
else
|
||||
{
|
||||
elemName = 'channel';
|
||||
if (('video' === name) && (self.channelLastN >= 0))
|
||||
elemAttrs['last-n'] = self.channelLastN;
|
||||
if ('video' === name) {
|
||||
if (self.channelLastN >= 0) {
|
||||
elemAttrs['last-n'] = self.channelLastN;
|
||||
}
|
||||
if (config.adaptiveLastN) {
|
||||
elemAttrs['adaptive-last-n'] = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elem.c('content', { name: name });
|
||||
@@ -834,8 +840,14 @@ ColibriFocus.prototype.addNewParticipant = function (peer) {
|
||||
else
|
||||
{
|
||||
elemName = 'channel';
|
||||
if (('video' === name) && (self.channelLastN >= 0))
|
||||
elemAttrs['last-n'] = self.channelLastN;
|
||||
if ('video' === name) {
|
||||
if (self.channelLastN >= 0) {
|
||||
elemAttrs['last-n'] = self.channelLastN;
|
||||
}
|
||||
if (config.adaptiveLastN) {
|
||||
elemAttrs['adaptive-last-n'] = 'true';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elem.c('content', { name: name });
|
||||
|
||||
Reference in New Issue
Block a user