Skip to content

Commit

Permalink
Merge pull request goldfire#720 from f1v-developers/master
Browse files Browse the repository at this point in the history
510 + 606 + 592- IE bugs. Unsupported mime issues, IE not supporting …
  • Loading branch information
goldfire authored May 19, 2017
2 parents 5a750f1 + 39ac41c commit 6fd6e54
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,6 @@
// Remove the source or disconnect.
if (!self._webAudio) {
// Set the source to 0-second silence to stop any downloading.
sounds[i]._node.src = 'data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA';

// Remove any event listeners.
sounds[i]._node.removeEventListener('error', sounds[i]._errorFn, false);
Expand Down Expand Up @@ -1654,6 +1653,14 @@
*/
_ended: function(sound) {
var self = this;
// 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 && !self._node.ended) {
setTimeout(self._ended.bind(self, sound), 100);
return self;
}

var sprite = sound._sprite;

// Should this sound loop?
Expand Down Expand Up @@ -1979,7 +1986,7 @@
self._parent._emit('loaderror', self._id, self._node.error ? self._node.error.code : 0);

// Clear the event listener.
self._node.removeEventListener('error', self._errorListener, false);
self._node.removeEventListener('error', self._errorFn, false);
},

/**
Expand Down

0 comments on commit 6fd6e54

Please sign in to comment.