mirror of https://github.com/jitsi/jitsi-meet
parent
10f72f8e40
commit
7a9ff9975a
@ -1,3 +1,5 @@ |
|||||||
import './route'; |
import './route'; |
||||||
|
|
||||||
export * from './components'; |
export * from './components'; |
||||||
|
|
||||||
|
import './middleware'; |
||||||
|
@ -0,0 +1,40 @@ |
|||||||
|
// @flow
|
||||||
|
|
||||||
|
import { |
||||||
|
CONFERENCE_JOINED, |
||||||
|
VIDEO_QUALITY_LEVELS, |
||||||
|
setReceiveVideoQuality |
||||||
|
} from '../base/conference'; |
||||||
|
import { SET_REDUCED_UI } from '../base/responsive-ui'; |
||||||
|
import { MiddlewareRegistry } from '../base/redux'; |
||||||
|
import { setFilmstripEnabled } from '../filmstrip'; |
||||||
|
import { setToolboxEnabled } from '../toolbox'; |
||||||
|
|
||||||
|
MiddlewareRegistry.register(({ dispatch, getState }) => next => action => { |
||||||
|
const result = next(action); |
||||||
|
|
||||||
|
switch (action.type) { |
||||||
|
case CONFERENCE_JOINED: |
||||||
|
case SET_REDUCED_UI: { |
||||||
|
const state = getState(); |
||||||
|
const { audioOnly } = state['features/base/conference']; |
||||||
|
const { reducedUI } = state['features/base/responsive-ui']; |
||||||
|
|
||||||
|
dispatch(setToolboxEnabled(!reducedUI)); |
||||||
|
dispatch(setFilmstripEnabled(!reducedUI)); |
||||||
|
|
||||||
|
// XXX: Currently setting the received video quality will disable
|
||||||
|
// audio-only mode if engaged, that's why we check for it here.
|
||||||
|
if (!audioOnly) { |
||||||
|
dispatch(setReceiveVideoQuality( |
||||||
|
reducedUI |
||||||
|
? VIDEO_QUALITY_LEVELS.LOW |
||||||
|
: VIDEO_QUALITY_LEVELS.HIGH)); |
||||||
|
} |
||||||
|
|
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return result; |
||||||
|
}); |
Loading…
Reference in new issue