|
|
@@ -84,7 +84,7 @@ export class TPCUtils {
|
|
84
|
84
|
*/
|
|
85
|
85
|
_calculateActiveEncodingParams(localVideoTrack, codec, newHeight) {
|
|
86
|
86
|
const codecBitrates = this.codecSettings[codec].maxBitratesVideo;
|
|
87
|
|
- const trackCaptureHeight = localVideoTrack.resolution;
|
|
|
87
|
+ const trackCaptureHeight = localVideoTrack.getCaptureResolution();
|
|
88
|
88
|
const effectiveNewHeight = newHeight > trackCaptureHeight ? trackCaptureHeight : newHeight;
|
|
89
|
89
|
const desktopShareBitrate = this.pc.options?.videoQuality?.desktopbitrate || codecBitrates.ssHigh;
|
|
90
|
90
|
const isScreenshare = localVideoTrack.getVideoType() === VideoType.DESKTOP;
|
|
|
@@ -177,7 +177,7 @@ export class TPCUtils {
|
|
177
|
177
|
* @param {String} codec
|
|
178
|
178
|
*/
|
|
179
|
179
|
_getVideoStreamEncodings(localTrack, codec) {
|
|
180
|
|
- const captureResolution = localTrack.resolution;
|
|
|
180
|
+ const captureResolution = localTrack.getCaptureResolution();
|
|
181
|
181
|
const codecBitrates = this.codecSettings[codec].maxBitratesVideo;
|
|
182
|
182
|
const videoType = localTrack.getVideoType();
|
|
183
|
183
|
let effectiveScaleFactors = SIM_LAYERS.map(sim => sim.scaleFactor);
|
|
|
@@ -360,7 +360,7 @@ export class TPCUtils {
|
|
360
|
360
|
* @returns {Array<boolean>}
|
|
361
|
361
|
*/
|
|
362
|
362
|
calculateEncodingsActiveState(localVideoTrack, codec, newHeight) {
|
|
363
|
|
- const height = localVideoTrack.resolution;
|
|
|
363
|
+ const height = localVideoTrack.getCaptureResolution();
|
|
364
|
364
|
const videoStreamEncodings = this._getVideoStreamEncodings(localVideoTrack, codec);
|
|
365
|
365
|
const encodingsState = videoStreamEncodings
|
|
366
|
366
|
.map(encoding => height / encoding.scaleResolutionDownBy)
|
|
|
@@ -543,7 +543,7 @@ export class TPCUtils {
|
|
543
|
543
|
* @returns {number|null} The max encoded resolution for the given video track.
|
|
544
|
544
|
*/
|
|
545
|
545
|
getConfiguredEncodeResolution(localVideoTrack, codec) {
|
|
546
|
|
- const height = localVideoTrack.resolution;
|
|
|
546
|
+ const height = localVideoTrack.getCaptureResolution();
|
|
547
|
547
|
const videoSender = this.pc.findSenderForTrack(localVideoTrack.getTrack());
|
|
548
|
548
|
let maxHeight = 0;
|
|
549
|
549
|
|