[feat](trx-rs): show audio bitrate and active stream count on About page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -3268,11 +3268,18 @@ function render(update) {
|
||||
document.getElementById("about-audio-codec").textContent = "Opus";
|
||||
document.getElementById("about-audio-samplerate").textContent = `${(streamInfo.sample_rate || 48000).toLocaleString()} Hz`;
|
||||
document.getElementById("about-audio-channels").textContent = (streamInfo.channels || 1) === 1 ? "Mono" : "Stereo";
|
||||
if (streamInfo.bitrate_bps) {
|
||||
const kbps = (streamInfo.bitrate_bps / 1000).toFixed(0);
|
||||
document.getElementById("about-audio-bitrate").textContent = `${kbps} kbps`;
|
||||
}
|
||||
if (streamInfo.frame_duration_ms) {
|
||||
document.getElementById("about-audio-frame").textContent = `${streamInfo.frame_duration_ms} ms`;
|
||||
}
|
||||
}
|
||||
document.getElementById("about-audio-rx").textContent = rxActive ? "Active" : "Off";
|
||||
if (typeof update.audio_clients === "number") {
|
||||
document.getElementById("about-audio-streams").textContent = update.audio_clients;
|
||||
}
|
||||
|
||||
// About — Decoders card
|
||||
const decMap = [
|
||||
|
||||
@@ -1056,8 +1056,10 @@
|
||||
<tr><td>Codec</td><td id="about-audio-codec">--</td></tr>
|
||||
<tr><td>Sample rate</td><td id="about-audio-samplerate">--</td></tr>
|
||||
<tr><td>Channels</td><td id="about-audio-channels">--</td></tr>
|
||||
<tr><td>Bitrate</td><td id="about-audio-bitrate">--</td></tr>
|
||||
<tr><td>Frame duration</td><td id="about-audio-frame">--</td></tr>
|
||||
<tr><td>RX status</td><td id="about-audio-rx">Off</td></tr>
|
||||
<tr><td>Active streams</td><td id="about-audio-streams">--</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Decoders -->
|
||||
|
||||
Reference in New Issue
Block a user