Changing track resets the volume
Describe the bug Loading a track resets the volume set previously
This is almost certainly due to howl instance being recreated on load:
https://github.com/E-Kuerschner/useAudioPlayer/blob/5268fc0113d6930888f7adae7c10f5d4091faf8a/src/useGlobalAudioPlayer.ts#L44-L50
https://github.com/E-Kuerschner/useAudioPlayer/blob/5268fc0113d6930888f7adae7c10f5d4091faf8a/src/HowlInstanceManager.ts#L32-L33
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 track -
setVolume(anything other than 100%) -
loadanother 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
Hi @ranile, thank you for the issue. I have some time coming up dedicated to this project so I will see about getting this in. Planning for some maintenance work on the repo as well as some bug fixes.