Skip to content

Commit

Permalink
visualize qualityLimitationReason
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Oct 5, 2023
1 parent 21f3073 commit 31d29d2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion import.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,11 +620,36 @@ function processConnections(connectionIds, data) {
}
plotBands.push({
from: item[0],
to: (values[index + 1] || [])[0]
to: (values[index + 1] || [])[0],
label: {
align: 'center',
text: series.ssrc + ' disabled',
},
});
});
return;
}
if (name === 'qualityLimitationReason' && statsType === 'outbound-rtp') {
// set up a x-axis plotbands:
// https://www.highcharts.com/docs/chart-concepts/plot-bands-and-plot-lines
data.filter((el, index, values) => {
return !(index > 0 && index < values.length - 1 && values[index - 1][1] == el[1]);
}).forEach((item, index, values) => {
if (item[1] === 'none') {
return;
}
plotBands.push({
from: item[0],
to: (values[index + 1] || [])[0],
label: {
align: 'center',
text: item[1] + '-limited',
},
});
});
return;
}

if (['encoderImplementation', 'decoderImplementation'].includes(name)) {
// TODO: avoid "unknown"
series[name] = data[0][1];
Expand Down

0 comments on commit 31d29d2

Please sign in to comment.