Merge pull request #768 from bryanbraun/dev

Address an edge-case for "Interrupted" states in Safari.
This commit is contained in:
Yotam Mann 2020-12-10 19:21:02 -05:00 committed by GitHub
commit 7c8af8cd99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -438,7 +438,7 @@ export class Context extends BaseContext {
* to initially start the AudioContext. See [[Tone.start]]
*/
resume(): Promise<void> {
if (this._context.state === "suspended" && isAudioContext(this._context)) {
if (isAudioContext(this._context)) {
return this._context.resume();
} else {
return Promise.resolve();