mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
properly detect lowestVariant for system health (#2455)
This commit is contained in:
parent
352d5cce64
commit
8f29acb7dd
@ -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…
x
Reference in New Issue
Block a user