Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(video-constraints) Fix calculations (#11161)

Robert Pintiliia131644dfb58
diff --git a/react/features/video-quality/subscriber.js b/react/features/video-quality/subscriber.js
index b94fd25566..cc96ee8ca3 100644
--- a/react/features/video-quality/subscriber.js
+++ b/react/features/video-quality/subscriber.js
@@ -279,14 +279,16 @@ function _updateReceiverVideoConstraints({ getState }) {
const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
visibleRemoteTrackSourceNames.forEach(sourceName => {
- receiverConstraints.constraints[sourceName] = { 'maxHeight': qualityLevel };
+ receiverConstraints.constraints[sourceName] = { 'maxHeight': Math.min(qualityLevel,
+ maxFrameHeight) };
});
}
if (largeVideoSourceName) {
let quality = maxFrameHeight;
- if (!remoteScreenShares.find(id => id === largeVideoParticipantId)) {
+ if (navigator.product !== 'ReactNative'
+ && !remoteScreenShares.find(id => id === largeVideoParticipantId)) {
quality = getVideoQualityForLargeVideo();
}
receiverConstraints.constraints[largeVideoSourceName] = { 'maxHeight': quality };
@@ -326,14 +328,16 @@ function _updateReceiverVideoConstraints({ getState }) {
const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
visibleRemoteParticipants.forEach(participantId => {
- receiverConstraints.constraints[participantId] = { 'maxHeight': qualityLevel };
+ receiverConstraints.constraints[participantId] = { 'maxHeight': Math.min(qualityLevel,
+ maxFrameHeight) };
});
}
if (largeVideoParticipantId) {
let quality = maxFrameHeight;
- if (!remoteScreenShares.find(id => id === largeVideoParticipantId)) {
+ if (navigator.product !== 'ReactNative'
+ && !remoteScreenShares.find(id => id === largeVideoParticipantId)) {
quality = getVideoQualityForLargeVideo();
}
receiverConstraints.constraints[largeVideoParticipantId] = { 'maxHeight': quality };