|
@@ -1,6 +1,8 @@
|
1
|
1
|
import * as ConnectionQualityEvents
|
2
|
2
|
from '../../service/connectivity/ConnectionQualityEvents';
|
3
|
3
|
import * as ConferenceEvents from '../../JitsiConferenceEvents';
|
|
4
|
+import * as RTCEvents from '../../service/RTC/RTCEvents';
|
|
5
|
+
|
4
|
6
|
import { getLogger } from 'jitsi-meet-logger';
|
5
|
7
|
|
6
|
8
|
const XMPPEvents = require('../../service/xmpp/XMPPEvents');
|
|
@@ -278,6 +280,11 @@ export default class ConnectionQuality {
|
278
|
280
|
this._maybeUpdateUnmuteTime();
|
279
|
281
|
}
|
280
|
282
|
});
|
|
283
|
+ conference.rtc.on(
|
|
284
|
+ RTCEvents.LOCAL_TRACK_MAX_ENABLED_RESOLUTION_CHANGED,
|
|
285
|
+ track => {
|
|
286
|
+ this._localStats.maxEnabledResolution = track.maxEnabledResolution;
|
|
287
|
+ });
|
281
|
288
|
|
282
|
289
|
conference.on(
|
283
|
290
|
ConferenceEvents.SERVER_REGION_CHANGED,
|
|
@@ -454,6 +461,7 @@ export default class ConnectionQuality {
|
454
|
461
|
connectionQuality: this._localStats.connectionQuality,
|
455
|
462
|
jvbRTT: this._localStats.jvbRTT,
|
456
|
463
|
serverRegion: this._localStats.serverRegion,
|
|
464
|
+ maxEnabledResolution: this._localStats.maxEnabledResolution,
|
457
|
465
|
avgAudioLevels: this._localStats.localAvgAudioLevels
|
458
|
466
|
};
|
459
|
467
|
|
|
@@ -504,7 +512,8 @@ export default class ConnectionQuality {
|
504
|
512
|
const videoType
|
505
|
513
|
= localVideoTrack ? localVideoTrack.videoType : undefined;
|
506
|
514
|
const isMuted = localVideoTrack ? localVideoTrack.isMuted() : true;
|
507
|
|
- const resolution = localVideoTrack ? localVideoTrack.resolution : null;
|
|
515
|
+ const resolution = localVideoTrack
|
|
516
|
+ ? Math.min(localVideoTrack.resolution, localVideoTrack.maxEnabledResolution) : null;
|
508
|
517
|
|
509
|
518
|
if (!isMuted) {
|
510
|
519
|
this._maybeUpdateUnmuteTime();
|
|
@@ -545,6 +554,7 @@ export default class ConnectionQuality {
|
545
|
554
|
connectionQuality: data.connectionQuality,
|
546
|
555
|
jvbRTT: data.jvbRTT,
|
547
|
556
|
serverRegion: data.serverRegion,
|
|
557
|
+ maxEnabledResolution: data.maxEnabledResolution,
|
548
|
558
|
avgAudioLevels: data.avgAudioLevels
|
549
|
559
|
};
|
550
|
560
|
|