openvidu-testapp: add degradationPreference "maintain-resolution" as default value

pull/907/head
pabloFuente 2026-09-01 19:16:05 +02:00
parent 3326bb9614
commit ce5adc3587
4 changed files with 3167 additions and 1549 deletions

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,9 @@
"overrides": { "overrides": {
"livekit-client": { "livekit-client": {
"@livekit/protocol": "$@livekit/protocol" "@livekit/protocol": "$@livekit/protocol"
},
"livekit-server-sdk": {
"@livekit/protocol": "$@livekit/protocol"
} }
}, },
"scripts": { "scripts": {
@ -27,13 +30,13 @@
"@angular/material": "^22.0.4", "@angular/material": "^22.0.4",
"@angular/platform-browser": "^22.0.6", "@angular/platform-browser": "^22.0.6",
"@angular/router": "^22.0.6", "@angular/router": "^22.0.6",
"@livekit/protocol": "^1.49.0", "@livekit/protocol": "^1.50.4",
"@livekit/track-processors": "^0.7.2", "@livekit/track-processors": "^0.7.2",
"buffer": "^6.0.3", "buffer": "^6.0.3",
"crypto-browserify": "^3.12.1", "crypto-browserify": "^3.12.1",
"json-stringify-safe": "5.0.1", "json-stringify-safe": "5.0.1",
"livekit-client": "2.20.1", "livekit-client": "2.22.1",
"livekit-server-sdk": "^2.17.0", "livekit-server-sdk": "^2.18.0",
"rxjs": "~7.8.2", "rxjs": "~7.8.2",
"stream-browserify": "^3.0.0", "stream-browserify": "^3.0.0",
"tslib": "^2.8.1", "tslib": "^2.8.1",

View File

@ -216,6 +216,14 @@
} }
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field id="trackPublish-degradationPreference">
<mat-label>degradationPreference</mat-label>
<mat-select [(value)]="trackPublishOptions.degradationPreference">
@for (pref of ['balanced','maintain-framerate','maintain-resolution']; track pref) {
<mat-option [value]="pref" [ngClass]="'degradation-' + pref">{{pref}}</mat-option>
}
</mat-select>
</mat-form-field>
<mat-form-field id="trackPublish-videoSimulcastLayers"> <mat-form-field id="trackPublish-videoSimulcastLayers">
<mat-label>videoSimulcastLayers</mat-label> <mat-label>videoSimulcastLayers</mat-label>
<mat-select multiple [(value)]="trackPublishOptions.videoSimulcastLayers" [compareWith]="compareVideoPresets"> <mat-select multiple [(value)]="trackPublishOptions.videoSimulcastLayers" [compareWith]="compareVideoPresets">

View File

@ -124,6 +124,12 @@ export class OpenviduInstanceComponent {
frameRate: 30, frameRate: 30,
}, },
}, },
publishDefaults: {
// maintain-resolution keeps simulcast/SVC layer sizes deterministic under
// CPU load (the browser drops framerate instead of rescaling every layer),
// which the e2e tests rely on when asserting received layer widths.
degradationPreference: 'maintain-resolution',
},
singlePeerConnection: false singlePeerConnection: false
}; };
roomConnectOptions: RoomConnectOptions = { roomConnectOptions: RoomConnectOptions = {
@ -1658,7 +1664,7 @@ export class OpenviduInstanceComponent {
let selectedCandidatePairId: string = ''; let selectedCandidatePairId: string = '';
const stats: any = await new Promise((res) => { const stats: any = await new Promise((res) => {
const reports_stats: any[] = []; const reports_stats: any[] = [];
pcTransport.getStats().then((stats: any) => { pcTransport.getStats()?.then((stats: any) => {
stats.forEach((report: any) => { stats.forEach((report: any) => {
console.log('Report Type:', report.type); console.log('Report Type:', report.type);
if (report.type === 'transport') { if (report.type === 'transport') {