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

React-sound soundmanager doesnt work with useHistory hook #96

Open
ridhwaans opened this issue May 25, 2021 · 0 comments
Open

React-sound soundmanager doesnt work with useHistory hook #96

ridhwaans opened this issue May 25, 2021 · 0 comments

Comments

@ridhwaans
Copy link

ridhwaans commented May 25, 2021

React-sound audio playback works as expected with react-router-dom. The audio doesnt suspend or shutdown when using <Link>

Using goBack() and goForward() from the useHistory hook stops the audio playing for some reason, even though it does not reload/refresh the page. it behaves like <Link> to the previous/next browserrouter <Route>
console log is

soundmanager2.js:1307 sound0: Destruct
soundmanager2.js:1307 sound0: Removing event listeners
soundmanager2.js:1307 sound0: stop()
soundmanager2.js:1307 sound0: unload()
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

1 participant