Browse Source

Adds an option to enable adaptive-last-n.

j8
Boris Grozev 11 years ago
parent
commit
5bec891d41
2 changed files with 17 additions and 4 deletions
  1. 1
    0
      config.js
  2. 16
    4
      libs/colibri/colibri.focus.js

+ 1
- 0
config.js View File

20
     enableRtpStats: true, // Enables RTP stats processing
20
     enableRtpStats: true, // Enables RTP stats processing
21
     openSctp: true, // Toggle to enable/disable SCTP channels
21
     openSctp: true, // Toggle to enable/disable SCTP channels
22
     channelLastN: -1, // The default value of the channel attribute last-n.
22
     channelLastN: -1, // The default value of the channel attribute last-n.
23
+    adaptiveLastN: false,
23
     useRtcpMux: true,
24
     useRtcpMux: true,
24
     useBundle: true,
25
     useBundle: true,
25
     enableRecording: false,
26
     enableRecording: false,

+ 16
- 4
libs/colibri/colibri.focus.js View File

292
         else
292
         else
293
         {
293
         {
294
             elemName = 'channel';
294
             elemName = 'channel';
295
-            if (('video' === name) && (self.channelLastN >= 0))
296
-                elemAttrs['last-n'] = self.channelLastN;
295
+            if ('video' === name) {
296
+                if (self.channelLastN >= 0) {
297
+                    elemAttrs['last-n'] = self.channelLastN;
298
+                }
299
+                if (config.adaptiveLastN) {
300
+                    elemAttrs['adaptive-last-n'] = 'true';
301
+                }
302
+            }
297
         }
303
         }
298
 
304
 
299
         elem.c('content', { name: name });
305
         elem.c('content', { name: name });
834
         else
840
         else
835
         {
841
         {
836
             elemName = 'channel';
842
             elemName = 'channel';
837
-            if (('video' === name) && (self.channelLastN >= 0))
838
-                elemAttrs['last-n'] = self.channelLastN;
843
+            if ('video' === name) {
844
+                if (self.channelLastN >= 0) {
845
+                    elemAttrs['last-n'] = self.channelLastN;
846
+                }
847
+                if (config.adaptiveLastN) {
848
+                    elemAttrs['adaptive-last-n'] = 'true';
849
+                }
850
+            }
839
         }
851
         }
840
 
852
 
841
         elem.c('content', { name: name });
853
         elem.c('content', { name: name });

Loading…
Cancel
Save