Kagami / vmsg

:musical_note: Library for creating voice messages
https://kagami.github.io/vmsg/
Creative Commons Zero v1.0 Universal
348 stars 58 forks source link

Failed to execute close on AudioContext #63

Open binlux opened 3 years ago

binlux commented 3 years ago

after updating google chrome to v90

Capture

CHANist commented 3 years ago

I also suffer the same issue. However, using vmsg v0.3.6 instead of v0.4.0, solves the issue.

vacho commented 1 year ago

I have related issue "Uncaught (in promise) DOMException: Can't close an AudioContext twice" for V0.4.0 This is the line: https://github.com/Kagami/vmsg/blob/623b2940a37f5a309cd4d13411a0894664131079/vmsg.js#L172

NOTE: locally this was fixed by this:

- if (this.audioCtx) this.audioCtx.close();
+ if (this.audioCtx && this.audioCtx.state != 'closed') this.audioCtx.close();

What do you think?