[RN] Fix setReceivedVideoQuality if we are not yet in a conference

It may happen that such action is fired while joining.
This commit is contained in:
Saúl Ibarra Corretgé 2018-01-31 17:41:12 +01:00 committed by Lyubo Marinov
parent da0ae73d10
commit c087e90099
1 changed files with 5 additions and 3 deletions

View File

@ -320,10 +320,12 @@ function _setLastN(store, next, action) {
function _setReceiveVideoQuality({ dispatch, getState }, next, action) { function _setReceiveVideoQuality({ dispatch, getState }, next, action) {
const { audioOnly, conference } = getState()['features/base/conference']; const { audioOnly, conference } = getState()['features/base/conference'];
if (conference) {
conference.setReceiverVideoConstraint(action.receiveVideoQuality); conference.setReceiverVideoConstraint(action.receiveVideoQuality);
if (audioOnly) { if (audioOnly) {
dispatch(toggleAudioOnly()); dispatch(toggleAudioOnly());
} }
}
return next(action); return next(action);
} }