HPG Warnung in Dispatch Settings, Status Notification
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user