Merge pull request #20681 from JoVictorNunes/fix-connection-status-sorting

fix(connection-status): user report sorting
This commit is contained in:
Ramón Souza 2024-07-11 10:56:37 -03:00 committed by GitHub
commit ab28888bc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View File

@ -75,14 +75,16 @@ const startStatsTimeout = () => {
};
const sortLevel = (a, b) => {
const STATS = window.meetingClientSettings.public.stats;
const RTT = window.meetingClientSettings.public.stats.rtt;
const indexOfA = STATS.level.indexOf(a.level);
const indexOfB = STATS.level.indexOf(b.level);
if (!a.lastUnstableStatus && !b.lastUnstableStatus) return 0;
if (!a.lastUnstableStatus) return 1;
if (!b.lastUnstableStatus) return -1;
if (indexOfA < indexOfB) return 1;
if (indexOfA === indexOfB) return 0;
if (indexOfA > indexOfB) return -1;
const rttOfA = RTT[a.lastUnstableStatus];
const rttOfB = RTT[b.lastUnstableStatus];
return rttOfB - rttOfA;
};
const sortOnline = (a, b) => {

View File

@ -30,7 +30,10 @@ class ConnectionStatus {
private rttValue = makeVar(0);
// @ts-ignore
private networkData: ReactiveVar<NetworkData> = makeVar({});
private networkData: ReactiveVar<NetworkData> = makeVar({
audio: {},
video: {},
});
private jitterStatus = makeVar('normal');