Describe the bug
Loading a track resets the volume set previously
This is almost certainly due to howl instance being recreated on load:
|
const load = useCallback((...[src, options = {}]: LoadArguments) => { |
|
// the HowlInstanceManager will intercept this newly created howl and broadcast it to registered hooks |
|
howlManager.current.createHowl({ |
|
src, |
|
...options |
|
}) |
|
}, []) |
|
public createHowl(options: { src: string } & AudioLoadOptions) { |
|
this.destroyHowl() |
Reusing the same howl instance, or at least copying over the settings from current one over should resolve this
To Reproduce
With global audio player
load a track
setVolume (anything other than 100%)
load another track
- Volume is back to 100%
Expected behavior
Volume should stay
Environment (please complete the following information):
- Browser/ browser version: Firefox 132.0.2
- Library version: 2.2.0
- React version: 18.2.0
- Node version: 18
Describe the bug
Loading a track resets the volume set previously
This is almost certainly due to howl instance being recreated on
load:useAudioPlayer/src/useGlobalAudioPlayer.ts
Lines 44 to 50 in 5268fc0
useAudioPlayer/src/HowlInstanceManager.ts
Lines 32 to 33 in 5268fc0
Reusing the same howl instance, or at least copying over the settings from current one over should resolve this
To Reproduce
With global audio player
loada tracksetVolume(anything other than 100%)loadanother trackExpected behavior
Volume should stay
Environment (please complete the following information):