Skip to content

Commit

Permalink
feat(config): add last N limit mapping (jitsi#7422)
Browse files Browse the repository at this point in the history
Adds 'lastNLimits' config value which allows to define last N value per number of participants.
See config.js for more details.
  • Loading branch information
paweldomas authored Aug 3, 2020
1 parent 168dbd6 commit cc9cb6a
Show file tree
Hide file tree
Showing 10 changed files with 13,887 additions and 6,352 deletions.
29 changes: 29 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// babel is used for jest
// FIXME make jest work with webpack if possible?
module.exports = {
env: {
test: {
plugins: [

// Stage 2
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-chaining',

// Stage 3
'@babel/plugin-syntax-dynamic-import',
[ '@babel/plugin-proposal-class-properties', { loose: false } ],
'@babel/plugin-proposal-json-strings',

// lib-jitsi-meet
'@babel/plugin-transform-flow-strip-types'
],
presets: [
'@babel/env',
'@babel/preset-flow',
'@babel/react'
]
}
}
};
16 changes: 16 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,22 @@ var config = {
// Default value for the channel "last N" attribute. -1 for unlimited.
channelLastN: -1,

// Provides a way to use different "last N" values based on the number of participants in the conference.
// The keys in an Object represent number of participants and the values are "last N" to be used when number of
// participants gets to or above the number.
//
// For the given example mapping, "last N" will be set to 20 as long as there are at least 5, but less than
// 29 participants in the call and it will be lowered to 15 when the 30th participant joins. The 'channelLastN'
// will be used as default until the first threshold is reached.
//
// lastNLimits: {
// 5: 20,
// 30: 15,
// 50: 10,
// 70: 5,
// 90: 2
// },

// // Options for the recording limit notification.
// recordingLimit: {
//
Expand Down
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
moduleFileExtensions: [
'js'
],
testMatch: [
'<rootDir>/react/**/?(*.)+(test)?(.web).js?(x)'
],
verbose: true
};
Loading

0 comments on commit cc9cb6a

Please sign in to comment.