Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

error with getting howler's sounds rate #155

Open
qweasdzxcpkh opened this issue Feb 14, 2025 · 2 comments
Open

error with getting howler's sounds rate #155

qweasdzxcpkh opened this issue Feb 14, 2025 · 2 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@qweasdzxcpkh
Copy link

Describe the bug
i use useGlobalAudioPlayer hook multiple times, both in outer component and nested inner component.
the outer component useEffect to load the musicSrc:

const ctx = useGlobalAudioPlayer()
  const { load, setVolume } = ctx
  useEffect(() => {
    if (musicSrc) {
      load(musicSrc, {
        loop: true,
        onload: () => {
          setVolume(0.15)
        }
      });
    }
  }, [load, musicSrc])

this will cause an error

Image

To Reproduce
Steps to reproduce the behavior:
i can reproduce in ios safari real device debug. but reproduce in mac chrome occasionally. using the above code and display ogg audio

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • Browser/ browser version: ios chrome latest version
  • Library version: 2.2.0
  • React version: 18.3.1
  • Node version: 20.18.0
@E-Kuerschner
Copy link
Owner

Hi @qweasdzxcpkh, thank you for the issue! I'm afraid that without more details I won't be able to be of much help. I have seen this issue in the past, but it's always been due to calling a method (like setVolume) after a howl has already been cleaned up, but in this case maybe it is due to a method being called before the howl has finished loading. If you can create a small example reproducing the issue and share the GH link, I would be happy to investigate.

Additionally, I am in the midst of a rewrite for version 3.0.0 which should be ready for alpha release sometime in the next couple of weeks. If you would be interested in trying it out and providing feedback please consider watching the Github for future releases!

@E-Kuerschner E-Kuerschner added bug Something isn't working question Further information is requested labels Feb 14, 2025
@qweasdzxcpkh
Copy link
Author

Hi @qweasdzxcpkh, thank you for the issue! I'm afraid that without more details I won't be able to be of much help. I have seen this issue in the past, but it's always been due to calling a method (like setVolume) after a howl has already been cleaned up, but in this case maybe it is due to a method being called before the howl has finished loading. If you can create a small example reproducing the issue and share the GH link, I would be happy to investigate.

Additionally, I am in the midst of a rewrite for version 3.0.0 which should be ready for alpha release sometime in the next couple of weeks. If you would be interested in trying it out and providing feedback please consider watching the Github for future releases!

thanks a lot. i'm afraid i don't have time to reproduce the codebase. but i'll be happy to try the 3.0.0 version to see if this issue is reproduced.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants