|
@@ -2519,10 +2519,12 @@ TraceablePeerConnection.prototype.setSenderVideoConstraints = function(frameHeig
|
2519
|
2519
|
|
2520
|
2520
|
// For p2p and cases and where simulcast is explicitly disabled.
|
2521
|
2521
|
} else if (frameHeight > 0) {
|
|
2522
|
+ let scaleFactor = HD_SCALE_FACTOR;
|
|
2523
|
+
|
2522
|
2524
|
// Do not scale down encodings for desktop tracks for non-simulcast case.
|
2523
|
|
- const scaleFactor = videoType === VideoType.DESKTOP || localVideoTrack.resolution <= frameHeight
|
2524
|
|
- ? HD_SCALE_FACTOR
|
2525
|
|
- : Math.floor(localVideoTrack.resolution / frameHeight);
|
|
2525
|
+ if (videoType === VideoType.CAMERA && localVideoTrack.resolution > frameHeight) {
|
|
2526
|
+ scaleFactor = Math.floor(localVideoTrack.resolution / frameHeight);
|
|
2527
|
+ }
|
2526
|
2528
|
|
2527
|
2529
|
parameters.encodings[0].active = true;
|
2528
|
2530
|
parameters.encodings[0].scaleResolutionDownBy = scaleFactor;
|