Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

510 + 606 + 592- IE bugs. Unsupported mime issues, IE not supporting … #720

Merged
merged 1 commit into from
May 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/howler.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1479,7 +1479,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';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solves other legitimate issues and can't simply be removed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better solution would be to only not run this on IE.

@fabioelia do you think that would work better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what we ended up doing in our project when we detected the browser as IE


// Remove any event listeners.
sounds[i]._node.removeEventListener('error', sounds[i]._errorFn, false);
Expand Down Expand Up @@ -1653,6 +1652,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 @@ -1980,7 +1987,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