Skip to content

Commit

Permalink
IE11 doesn't set 'paused' on the node when it ends, so check for both…
Browse files Browse the repository at this point in the history
… 'paused' and 'ended'

Fixes goldfire#841
  • Loading branch information
goldfire authored and bhaskarp-vg committed Feb 7, 2018
1 parent 80f8a54 commit 2a45976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@
// If we are using IE and there was network latency we may be clipping
// audio before it completes playing. Lets check the node to make sure it
// believes it has completed, before ending the playback.
if (!self._webAudio && sound._node && !sound._node.paused) {
if (!self._webAudio && sound._node && !sound._node.paused && !sound._node.ended) {
setTimeout(self._ended.bind(self, sound), 100);
return self;
}
Expand Down

0 comments on commit 2a45976

Please sign in to comment.