...
| Code Block | ||||
|---|---|---|---|---|
| ||||
function showStat(stat, type) {
Object.keys(stat).forEach(function(key) {
if (typeof stat[key] !== 'object') {
let k = key.split(/(?=[A-Z])/);
let metric = "";
for (let i = 0; i < k.length; i++) {
metric += k[i][0].toUpperCase() + k[i].substring(1) + " ";
}
if ($("#" + key + "-" + type).length == 0) {
let html = "<div style='font-weight: bold'>" + metric.trim() + ": <span id='" + key + "-" + type + "' style='font-weight: normal'></span>" + "</div>";
// $(html).insertAfter("#" + type);
$("#" + type).append(html);
} else {
$("#" + key + "-" + type).text(stat[key]);
}
}
});
} |
Testing
1. For the test we use:
- WCS 5.2.409 or newer
- Media Devices example in Chrome browser
- publishing channel with 100 Mbps upload and download bandwidth
- bandwidth shaping tool, winShaper on Windows or Network Link Conditioner on MacOS for example
...