conference: fix not applying max recv constraints

They also need to be applied when changing conferences.
This commit is contained in:
Saúl Ibarra Corretgé 2020-07-08 10:27:18 +02:00 committed by Saúl Ibarra Corretgé
parent f32140c4b7
commit ce812591f9
1 changed files with 3 additions and 2 deletions

View File

@ -117,14 +117,15 @@ StateListenerRegistry.register(
maxReceiverVideoQuality,
preferredVideoQuality
} = currentState;
const changedConference = conference !== previousState.conference;
const changedPreferredVideoQuality
= preferredVideoQuality !== previousState.preferredVideoQuality;
const changedMaxVideoQuality = maxReceiverVideoQuality !== previousState.maxReceiverVideoQuality;
if (changedPreferredVideoQuality || changedMaxVideoQuality) {
if (changedConference || changedPreferredVideoQuality || changedMaxVideoQuality) {
_setReceiverVideoConstraint(conference, preferredVideoQuality, maxReceiverVideoQuality);
}
if (changedPreferredVideoQuality) {
if (changedConference || changedPreferredVideoQuality) {
_setSenderVideoConstraint(conference, preferredVideoQuality);
}
});