Skip to content

Commit

Permalink
Merge pull request #679 from k888168168/master
Browse files Browse the repository at this point in the history
Update howler.core.js
  • Loading branch information
goldfire authored May 19, 2017
2 parents 5ff3acc + 0813f18 commit 456516d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@
// then check if the audio actually played to determine if
// audio has now been unlocked on iOS, Android, etc.
var unlock = function() {
// Fix Android can not play in suspend state.
Howler._autoResume();

// Create an empty buffer.
var source = self.ctx.createBufferSource();
source.buffer = self._scratchBuffer;
Expand Down Expand Up @@ -397,7 +400,7 @@
clearTimeout(self._suspendTimer);
self._suspendTimer = null;
} else if (self.state === 'suspended') {
self.state = 'resuming';
//self.state = 'resuming';
self.ctx.resume().then(function() {
self.state = 'running';

Expand Down

0 comments on commit 456516d

Please sign in to comment.