leoasis / leoasis/react-sound

React-sound soundmanager doesnt work with useHistory hook

Open
#96 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
490
Forks
80
PR merge metrics
No merged PRs in 30d

Description

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()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing navigation with React-sound and react-router-dom, comparing a Link transition with goBack() and goForward() from useHistory. Trace when the sound component is destroyed and confirm the intended playback behavior during history navigation; done means the two navigation paths behave consistently without the reported unexpected stop.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.