Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds an option to enable adaptive-last-n.

Boris Grozev5bec891d41ff
diff --git a/config.js b/config.js
index 7c5946894d..31b02ea22f 100644
--- a/config.js
+++ b/config.js
@@ -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,
diff --git a/libs/colibri/colibri.focus.js b/libs/colibri/colibri.focus.js
index 4e40ffe328..38b9fd810e 100644
--- a/libs/colibri/colibri.focus.js
+++ b/libs/colibri/colibri.focus.js
@@ -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 });