Browse Source

properly detect lowestVariant for system health (#2455)

pull/2477/head
Meisam 3 years ago committed by GitHub
parent
commit
8f29acb7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      web/pages/admin/stream-health.tsx

4
web/pages/admin/stream-health.tsx

@ -212,7 +212,9 @@ const StreamHealth = () => { @@ -212,7 +212,9 @@ const StreamHealth = () => {
const currentSpeed = bitrateChart[0]?.data[bitrateChart[0].data.length - 1]?.value;
const currentDownloadSeconds =
medianSegmentDownloadDurations[medianSegmentDownloadDurations.length - 1]?.value;
const lowestVariant = availableBitrates[0]; // TODO: get lowest bitrate from available bitrates
const lowestVariant = availableBitrates.reduce((bitrate1, bitrate2) =>
bitrate1.valueOf() < bitrate2.valueOf() ? bitrate1 : bitrate2,
);
const latencyMedian = medianLatency[medianLatency.length - 1]?.value || 0;
const latencyMax = highestLatency[highestLatency.length - 1]?.value || 0;

Loading…
Cancel
Save