-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
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
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 | |
}) | |
}, []) |
useAudioPlayer/src/HowlInstanceManager.ts
Lines 32 to 33 in 5268fc0
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 tracksetVolume
(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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working