Skip to content

[Feature] Save the mute state/preferences for the user just like theme. #33

@rajneesh069

Description

@rajneesh069

In the previous code, there was no feature to save the previous mute preferences for the user, i.e., each time the website loaded, the sounds were un-muted, but after this feature, the mute state/preference will be saved in the local storage, and will be retrieved same as the initial theme properties(props).
Code changes: -
Had to create a new initialMuteState.js file. After that, I created another isMuted variable to get the initial state of the mute preferences inside the getInitialProps.js file, to know if the website is muted already or not. And then created initialMuteState.js file to add respective class to the volume button in each case and added this script using the defer attribute inside the head tag. I had to remove the initial volume-fa-up class from the tag of the volume icon.

Screenshots:-
image

image

image

image

Video to demonstrate the changes :-

Notes.app.-.Google.Chrome.2024-01-01.12-30-42.mp4

I'd like to work on the issue if it gets approved.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions