HPG Warnung in Dispatch Settings, Status Notification

This commit is contained in:
PxlLoewe
2026-02-08 13:03:11 +01:00
parent 8340c2408c
commit aded6d1492
9 changed files with 78 additions and 25 deletions

View File

@@ -201,11 +201,23 @@ export const useAudioStore = create<TalkState>((set, get) => ({
});
}
const inputStream = await navigator.mediaDevices.getUserMedia({
audio: {
deviceId: get().settings.micDeviceId ?? undefined,
},
});
let inputStream = await navigator.mediaDevices
.getUserMedia({
audio: {
deviceId: get().settings.micDeviceId ?? undefined,
},
})
.catch((e) => {
console.error("Konnte das Audio-Gerät nicht öffnen:", e);
return null;
});
if (!inputStream) {
inputStream = await navigator.mediaDevices.getUserMedia({ audio: true }).catch((e) => {
console.error("Konnte das Audio-Gerät nicht öffnen:", e);
return null;
});
}
if (!inputStream) throw new Error("Konnte das Audio-Gerät nicht öffnen");
// Funk-Effekt anwenden
const radioStream = getRadioStream(inputStream, get().settings.micVolume);
if (!radioStream) throw new Error("Konnte Funkstream nicht erzeugen");