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

Impossible to play after a loaderror #613

Closed
Ni0rd opened this issue Sep 1, 2016 · 1 comment
Closed

Impossible to play after a loaderror #613

Ni0rd opened this issue Sep 1, 2016 · 1 comment

Comments

@Ni0rd
Copy link

Ni0rd commented Sep 1, 2016

Hi,

When I have a 404 during the load a sound, it's impossible to play another sound after.
I have some difficulties to understand the noAudio variable.

When a sound failed to load (with a 404 error), nodeAudio is set to true. Why ?
https://github.com/goldfire/howler.js/blob/master/src/howler.core.js#L1905

if (self._node.error && self._node.error.code === 4) {
  Howler.noAudio = true;
}

When I want to play a new sound after it, it's impossible because if noAudio is true, then all source will fail even if they could play.
https://github.com/goldfire/howler.js/blob/master/src/howler.core.js#L475

// If no audio is available, quit immediately.
if (Howler.noAudio) {
  self._emit('loaderror', null, 'No audio support.');
  return;
}

Should I reset Howler after an error ?

@ejacquier
Copy link

Hi,

Any update on this issue?
We noticed the same thing on our game.

As a workaround, we are changing back the Holwer.noAudio flag to false when a loaderror happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants