|
|
@@ -74,14 +74,15 @@ export default class ReceiveVideoController {
|
|
74
|
74
|
/**
|
|
75
|
75
|
* Updates the source based constraints based on the maxHeight set.
|
|
76
|
76
|
*
|
|
|
77
|
+ * @param {number} maxFrameHeight - the height to be requested for remote sources.
|
|
77
|
78
|
* @returns {void}
|
|
78
|
79
|
*/
|
|
79
|
|
- _updateIndividualConstraints() {
|
|
|
80
|
+ _updateIndividualConstraints(maxFrameHeight) {
|
|
80
|
81
|
const individualConstraints = this._receiverVideoConstraints.constraints;
|
|
81
|
82
|
|
|
82
|
83
|
if (individualConstraints && Object.keys(individualConstraints).length) {
|
|
83
|
84
|
for (const value of Object.values(individualConstraints)) {
|
|
84
|
|
- value.maxHeight = Math.min(value.maxHeight, this._maxFrameHeight);
|
|
|
85
|
+ value.maxHeight = maxFrameHeight ?? Math.min(value.maxHeight, this._maxFrameHeight);
|
|
85
|
86
|
}
|
|
86
|
87
|
} else {
|
|
87
|
88
|
this._receiverVideoConstraints.defaultConstraints = { 'maxHeight': this._maxFrameHeight };
|
|
|
@@ -184,7 +185,7 @@ export default class ReceiveVideoController {
|
|
184
|
185
|
if (session.isP2P) {
|
|
185
|
186
|
session.setReceiverVideoConstraint(this._getDefaultSourceReceiverConstraints(session, maxFrameHeight));
|
|
186
|
187
|
} else {
|
|
187
|
|
- this._updateIndividualConstraints();
|
|
|
188
|
+ this._updateIndividualConstraints(maxFrameHeight);
|
|
188
|
189
|
this._rtc.setReceiverVideoConstraints(this._receiverVideoConstraints);
|
|
189
|
190
|
}
|
|
190
|
191
|
}
|