Repository navigation
fix(client): set fcc-sound value in local storage after user data is fetched - #48106
nayabatir1 wants to merge 7 commits into
Conversation
|
👀 Review this PR in a CodeSee Review Map |
|
Please take a moment to give a name to the PR that follows the guidelines: https://contribute.freecodecamp.org/#/how-to-open-a-pull-request?id=prepare-a-good-pr-title |
I've updated pr title. |
ojeytonwilliams
left a comment
There was a problem hiding this comment.
Hi, could you limit the scope of this PR? If we can remove Tone, that's great, and we really appreciate you looking into this. However, each PR should ideally do one thing so that we (as maintainers) can easily evaluate each change.
Could you create a separate PR with just the removal of Tone?
|
This PR need NOT be reviewed any further until we have achieved agreement on #48107 |
Socket Security Pull Request ReportDependency issues detected. If you merge this pull request, you will not be alerted to the instances of these issues again. 📞 TelemetryThis package contains telemetry which tracks you.
Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with
Powered by socket.dev |
| "sha-1": "1.0.0", | ||
| "store": "2.0.12", | ||
| "stream-browserify": "3.0.0", | ||
| "tone": "14.7.77", |
|
|
||
| const sound = user[userId].sound; | ||
|
|
||
| localStorage.setItem('fcc-sound', sound); |
There was a problem hiding this comment.
Should we be using store here instead?
There was a problem hiding this comment.
I don't understand what additional benefits store provide over localStorage api, also syntactically both are similar.
There was a problem hiding this comment.
I believe store will adapt to use other storage APIs if the user is using a non-modern browser.
| if (tone.context.state !== 'running') { | ||
| tone.context.resume().catch(err => { | ||
| console.error('Error resuming audio context', err); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Why is this removed? We need to check that the audiocontext state is running, and if not, resume it.
There was a problem hiding this comment.
reference doc
I'm using player.start() to play audio which is basically same thing. Start audio context from suspended state
|
Hey @nayabatir1, Are you still working on this? Do you need help? |

Checklist:
Update index.md)mainbranch of freeCodeCamp.Closes #46372
Closes #48107
This is first method of solving issue
After user has logged in successfully I'm setting
fcc-soundvalue in local storage after user data is fetched infetchSessionUser.As
playTonegrabsfcc-soundvalue from local storage to play audio