Skip to content

Commit 223cca3

Browse files
author
Tomer Lahav
committed
Safer fix (do not call ctx.resume() on older environments that do not support it).
1 parent af4b787 commit 223cca3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/howler.core.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@
316316
}
317317

318318
// Calling resume() on a stack initiated by user gesture is what actually unlocks the audio on Android Chrome >= 55.
319-
self.ctx.resume();
319+
if (typeof self.ctx.resume === 'function') {
320+
self.ctx.resume();
321+
}
320322

321323
// Setup a timeout to check that we are unlocked on the next event loop.
322324
source.onended = function() {

0 commit comments

Comments
 (0)