Implement momentary and toggle microphone button types.

This commit is contained in:
Dermot Duffy
2023-05-06 15:59:57 -07:00
parent 11e1245d67
commit 2c1b8ed785
8 changed files with 91 additions and 25 deletions
+4 -1
View File
@@ -1,3 +1,5 @@
import { errorToConsole } from "./basic";
export class MicrophoneController {
protected _stream?: MediaStream | null;
protected _timerID: number | null = null;
@@ -19,7 +21,8 @@ export class MicrophoneController {
audio: true,
video: false,
});
} catch (e) {
} catch (e: unknown) {
errorToConsole(e as Error);
this._stream = null;
}
this._setMute();