[docs](trx-frontend): rename audio control labels
Update the web audio control labels in the markup and initialize the same labels from JavaScript for consistency. Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -2681,6 +2681,8 @@ sigClearBtn.addEventListener("click", () => {
|
||||
// --- Audio streaming ---
|
||||
const rxAudioBtn = document.getElementById("rx-audio-btn");
|
||||
const txAudioBtn = document.getElementById("tx-audio-btn");
|
||||
const RX_AUDIO_LABEL = "Play Audio";
|
||||
const TX_AUDIO_LABEL = "Transmit Audio";
|
||||
const audioStatus = document.getElementById("audio-status");
|
||||
const audioLevelFill = document.getElementById("audio-level-fill");
|
||||
const audioRow = document.getElementById("audio-row");
|
||||
@@ -2722,6 +2724,15 @@ const MAX_RX_BUFFER_SECS = 0.25;
|
||||
const TARGET_RX_BUFFER_SECS = 0.04;
|
||||
const MIN_RX_JITTER_SAMPLES = 512;
|
||||
|
||||
if (rxAudioBtn) {
|
||||
rxAudioBtn.textContent = RX_AUDIO_LABEL;
|
||||
rxAudioBtn.setAttribute("aria-label", RX_AUDIO_LABEL);
|
||||
}
|
||||
if (txAudioBtn) {
|
||||
txAudioBtn.textContent = TX_AUDIO_LABEL;
|
||||
txAudioBtn.setAttribute("aria-label", TX_AUDIO_LABEL);
|
||||
}
|
||||
|
||||
function setAudioLevel(levelPct) {
|
||||
if (!audioLevelFill) return;
|
||||
const clamped = Math.max(0, Math.min(100, Number.isFinite(levelPct) ? levelPct : 0));
|
||||
|
||||
@@ -240,8 +240,8 @@
|
||||
<div class="full-row label-below-row" id="audio-row">
|
||||
<div class="label"><span>Audio</span></div>
|
||||
<div class="inline" style="gap: 0.6rem; flex-wrap: wrap; align-items: center;">
|
||||
<button id="rx-audio-btn" type="button">RX Audio</button>
|
||||
<button id="tx-audio-btn" type="button">TX Audio</button>
|
||||
<button id="rx-audio-btn" type="button">Play Audio</button>
|
||||
<button id="tx-audio-btn" type="button">Transmit Audio</button>
|
||||
<label class="vol-label">RX<input type="range" id="rx-vol" min="0" max="100" value="80" class="vol-slider" /><small class="vol-pct" id="rx-vol-pct">80%</small></label>
|
||||
<label class="vol-label">TX<input type="range" id="tx-vol" min="0" max="100" value="80" class="vol-slider" /><small class="vol-pct" id="tx-vol-pct">80%</small></label>
|
||||
<div id="audio-level">
|
||||
|
||||
Reference in New Issue
Block a user