Skip to content

Commit

Permalink
Merge pull request goldfire#756 from Melatonin64/master
Browse files Browse the repository at this point in the history
Fix for WebAudio context not being unlocked on Android Chrome >= 55.
  • Loading branch information
goldfire authored Jun 9, 2017
2 parents 6bf8c9f + 223cca3 commit 3f7d817
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@
source.start(0);
}

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

// Setup a timeout to check that we are unlocked on the next event loop.
source.onended = function() {
source.disconnect(0);
Expand Down

0 comments on commit 3f7d817

Please sign in to comment.