[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,9 +320,11 @@ function _setLastN(store, next, action) {
function _setReceiveVideoQuality({ dispatch, getState }, next, action) {
const { audioOnly, conference } = getState()['features/base/conference'];
conference.setReceiverVideoConstraint(action.receiveVideoQuality);
if (audioOnly) {
dispatch(toggleAudioOnly());
if (conference) {
conference.setReceiverVideoConstraint(action.receiveVideoQuality);
if (audioOnly) {
dispatch(toggleAudioOnly());
}
}
return next(action);