Преглед изворни кода

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

Only calculate for Large Video on the web (otherwise native breaks)
Take preferred max into calculations
master
Robert Pintilii пре 3 година
родитељ
комит
a131644dfb
No account linked to committer's email address
1 измењених фајлова са 8 додато и 4 уклоњено
  1. 8
    4
      react/features/video-quality/subscriber.js

+ 8
- 4
react/features/video-quality/subscriber.js Прегледај датотеку

279
                 const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
279
                 const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
280
 
280
 
281
                 visibleRemoteTrackSourceNames.forEach(sourceName => {
281
                 visibleRemoteTrackSourceNames.forEach(sourceName => {
282
-                    receiverConstraints.constraints[sourceName] = { 'maxHeight': qualityLevel };
282
+                    receiverConstraints.constraints[sourceName] = { 'maxHeight': Math.min(qualityLevel,
283
+                        maxFrameHeight) };
283
                 });
284
                 });
284
             }
285
             }
285
 
286
 
286
             if (largeVideoSourceName) {
287
             if (largeVideoSourceName) {
287
                 let quality = maxFrameHeight;
288
                 let quality = maxFrameHeight;
288
 
289
 
289
-                if (!remoteScreenShares.find(id => id === largeVideoParticipantId)) {
290
+                if (navigator.product !== 'ReactNative'
291
+                    && !remoteScreenShares.find(id => id === largeVideoParticipantId)) {
290
                     quality = getVideoQualityForLargeVideo();
292
                     quality = getVideoQualityForLargeVideo();
291
                 }
293
                 }
292
                 receiverConstraints.constraints[largeVideoSourceName] = { 'maxHeight': quality };
294
                 receiverConstraints.constraints[largeVideoSourceName] = { 'maxHeight': quality };
326
                 const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
328
                 const qualityLevel = getVideoQualityForResizableFilmstripThumbnails(state);
327
 
329
 
328
                 visibleRemoteParticipants.forEach(participantId => {
330
                 visibleRemoteParticipants.forEach(participantId => {
329
-                    receiverConstraints.constraints[participantId] = { 'maxHeight': qualityLevel };
331
+                    receiverConstraints.constraints[participantId] = { 'maxHeight': Math.min(qualityLevel,
332
+                        maxFrameHeight) };
330
                 });
333
                 });
331
             }
334
             }
332
 
335
 
333
             if (largeVideoParticipantId) {
336
             if (largeVideoParticipantId) {
334
                 let quality = maxFrameHeight;
337
                 let quality = maxFrameHeight;
335
 
338
 
336
-                if (!remoteScreenShares.find(id => id === largeVideoParticipantId)) {
339
+                if (navigator.product !== 'ReactNative'
340
+                    && !remoteScreenShares.find(id => id === largeVideoParticipantId)) {
337
                     quality = getVideoQualityForLargeVideo();
341
                     quality = getVideoQualityForLargeVideo();
338
                 }
342
                 }
339
                 receiverConstraints.constraints[largeVideoParticipantId] = { 'maxHeight': quality };
343
                 receiverConstraints.constraints[largeVideoParticipantId] = { 'maxHeight': quality };

Loading…
Откажи
Сачувај