null out micSource and micMedia to make the GC happier
This commit is contained in:
parent
29a0971d57
commit
c4990f9f66
1 changed files with 2 additions and 0 deletions
|
@ -270,6 +270,8 @@ export class AudioEngine extends ((EngineEmitter as unknown) as {
|
|||
if (this.micSource !== null && this.micMedia !== null) {
|
||||
this.micMedia.getAudioTracks()[0].stop();
|
||||
this.micSource.disconnect();
|
||||
this.micSource = null;
|
||||
this.micMedia = null;
|
||||
}
|
||||
console.log("opening mic", deviceId);
|
||||
this.micMedia = await navigator.mediaDevices.getUserMedia({
|
||||
|
|
Loading…
Reference in a new issue