in web/components/Recorder/Recorder.ts [38:53]
async start(): Promise<void> {
if (this.stream !== null) {
throw new Error("already recording (stream is not null)");
}
if (this.recorder !== null) {
throw new Error("already recording");
}
this.stream = await navigator.mediaDevices.getUserMedia({ audio: true });
this.visualize(this.stream);
this.recorder = new MediaRecorder(this.stream);
this.recorder.onstop = this.onStop;
this.recorder.ondataavailable = this.onDataAvailable;
this.recorder.start();
}