mirror of https://github.com/jitsi/jitsi-meet
Also, use the configured resolution to set it as the max received frame size.pull/7268/head
parent
8d1bde3cb1
commit
7d513738d2
@ -0,0 +1,33 @@ |
||||
// @flow
|
||||
|
||||
import { CONFERENCE_JOINED } from '../base/conference/actionTypes'; |
||||
import { setPreferredVideoQuality } from '../base/conference/actions'; |
||||
import { MiddlewareRegistry } from '../base/redux'; |
||||
|
||||
import logger from './logger'; |
||||
|
||||
/** |
||||
* Implements the middleware of the feature video-quality. |
||||
* |
||||
* @param {Store} store - The redux store. |
||||
* @returns {Function} |
||||
*/ |
||||
MiddlewareRegistry.register(({ dispatch, getState }) => next => action => { |
||||
const result = next(action); |
||||
|
||||
switch (action.type) { |
||||
case CONFERENCE_JOINED: { |
||||
if (navigator.product === 'ReactNative') { |
||||
const { resolution } = getState()['features/base/config']; |
||||
|
||||
if (typeof resolution !== 'undefined') { |
||||
dispatch(setPreferredVideoQuality(Number.parseInt(resolution, 10))); |
||||
logger.info(`Configured preferred receiver video frame height to: ${resolution}`); |
||||
} |
||||
} |
||||
break; |
||||
} |
||||
} |
||||
|
||||
return result; |
||||
}); |
||||
Loading…
Reference in new issue