коррекция индикации микрофона

This commit is contained in:
Maxim
2026-07-06 15:18:26 +03:00
parent 8dcaee3d61
commit 243541fcd6
4 changed files with 54 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ import {
setBars,
setSignal,
setAudioIndicator,
setSoundLevel,
DOM,
setChannelValue,
setChannelCurrentValue,
@@ -254,6 +255,8 @@ async function update(): Promise<void> {
setServerTime(health.server_time);
}
setSoundLevel(health.sound_level ?? 0);
const isOnline = health.pipe_alive && health.has_data;
if (isOnline) {
@@ -384,6 +387,7 @@ async function update(): Promise<void> {
setServerTime("--:--:--");
setBars(0, true);
setSignal(0, true);
setSoundLevel(0);
resetBufferTracking();
if (lastSignalLevel > 0) {

View File

@@ -8,6 +8,7 @@ interface HealthResponse {
has_data: boolean;
latest: number;
server_time?: string;
sound_level?: number;
stats: {
filled: number;
bytes_per_sec: number;