Merge pull request #20681 from JoVictorNunes/fix-connection-status-sorting
fix(connection-status): user report sorting
This commit is contained in:
commit
ab28888bc4
@ -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) => {
|
||||
|
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user