From 38d655eee46ba7fd8c905f1ad74ca315052334e8 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 9 Jan 2021 13:01:41 +0100 Subject: [PATCH] Fixed microphone mute/unmute for web clients --- web/app/audio/Recorder.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/audio/Recorder.ts b/web/app/audio/Recorder.ts index 4d400f38..cb5dcca4 100644 --- a/web/app/audio/Recorder.ts +++ b/web/app/audio/Recorder.ts @@ -168,8 +168,10 @@ class JavascriptInput implements AbstractInput { } catch {} } - if(this.state != InputState.PAUSED) { - return; + if(this.state === InputState.RECORDING) { + return true; + } else if(this.state === InputState.INITIALIZING) { + return InputStartError.EBUSY; } /* do it async since if the doStart fails on the first iteration, we're setting the start promise, after it's getting cleared */