Closed aweibell closed 4 months ago
I created a sandbox, but am not able to reproduce the exact same behaviour. However, the global loading fails initially, then returns the correct data, so it seems like the state is mixed up here as well, as long as I did not retry load after the error occurred?
https://codesandbox.io/s/inspiring-cray-4zg5r6?file=/src/Components.js
Looking at the code, it seems like they share the same Howl instance in the end, since they use the same src
string?
interesting find @aweibell! perhaps like you suspect this comes down to an implementation detail within Howler. The lib does cache Howl instances (which this package also takes advantage of) so maybe it returns the same instance. If you find a solution ill be happy to look at the PR!
Closing since we could not reproduce reliably
Describe the bug When loading audio src/file with the same name in both
useGlobalAudioPlayer
anduseAudioPlayer
, the response seems to be mixed up. useAudioPlayer calls theonLoad
callback, butisReady
is false,isLoading
is false andduration
is 0.To Reproduce Steps to reproduce the behavior:
Expected behavior Expected duration to show length of audio track, but it shows 0, even if onload callback is called, which should indicate that it is loaded.
Environment (please complete the following information):