Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

After component is unmounted, sound is still playing #106

Open
mscin opened this issue Apr 26, 2022 · 2 comments
Open

After component is unmounted, sound is still playing #106

mscin opened this issue Apr 26, 2022 · 2 comments

Comments

@mscin
Copy link

mscin commented Apr 26, 2022

No description provided.

@mscin mscin changed the title After component unmount sound is still playing After component is unmounted, sound is still playing Apr 26, 2022
@manas-vyas-30
Copy link

I'm also facing same issue. Is there any solution available? thanks

@strass
Copy link

strass commented Jul 29, 2022

I use this approach:

  // Turn off sound when leaving page
  useEffect(() => {
    return () => {
      console.debug('Turning off background music')
      Howler.stop()
    }
  }, [])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants