Skip to content

Changing track resets the volume #147

@ranile

Description

@ranile

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

  1. load a track
  2. setVolume (anything other than 100%)
  3. load another track
  4. 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 working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions