-
Couldn't load subscription status.
- Fork 9
VIDSOL-269: Persist device preference in localStorage #220
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
base: develop
Are you sure you want to change the base?
VIDSOL-269: Persist device preference in localStorage #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements localStorage persistence for user audio/video device preferences, ensuring that when a user disables their microphone or camera during a meeting, these preferences are maintained across page refreshes until they return to the waiting room.
Key Changes:
- Added localStorage keys for tracking audio and video enabled states
- Modified publisher options to read from localStorage when initializing audio/video states
- Reset device preferences to enabled when entering the waiting room
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/utils/storage.ts | Added new storage keys for audio and video enabled states |
| frontend/src/Context/PublisherProvider/usePublisherOptions/usePublisherOptions.tsx | Modified to check localStorage when setting publishAudio and publishVideo properties |
| frontend/src/Context/PublisherProvider/usePublisherOptions/usePublisherOptions.spec.tsx | Added test coverage for localStorage-based audio/video disable functionality |
| frontend/src/Context/PublisherProvider/usePublisher/usePublisher.tsx | Updated toggle functions to persist audio/video states to localStorage |
| frontend/src/Context/PreviewPublisherProvider/usePreviewPublisher/usePreviewPublisher.tsx | Added localStorage reset logic in waiting room and persistence in toggle functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
frontend/src/Context/PublisherProvider/usePublisherOptions/usePublisherOptions.tsx
Outdated
Show resolved
Hide resolved
frontend/src/Context/PublisherProvider/usePublisher/usePublisher.tsx
Outdated
Show resolved
Hide resolved
frontend/src/Context/PublisherProvider/usePublisher/usePublisher.tsx
Outdated
Show resolved
Hide resolved
frontend/src/Context/PreviewPublisherProvider/usePreviewPublisher/usePreviewPublisher.tsx
Outdated
Show resolved
Hide resolved
frontend/src/Context/PreviewPublisherProvider/usePreviewPublisher/usePreviewPublisher.tsx
Outdated
Show resolved
Hide resolved
|
Hi @arnaud-lebreton-rofim, could you check the comments from copilot? |
|
@VZaphod i'll handle this asap 👍 |
91e91e3 to
fe3fa51
Compare
|
@VZaphod i simplified the code a bit according to Copilot suggestion. |
fe3fa51 to
080a058
Compare
What is this PR doing?
Persist, in localStorage, an user action to enable/disable his mic or camera upon page refresh when on a meeting.
Reset those value upon re-entering the WaitingRoom.
How should this be manually tested?
On the WaitingRoom, disable mic or camera
Join the Room, mic or camera is disabled
Refresh the page, mic or camera stay disabled
What are the relevant tickets?
A maintainer will add this ticket number.
Resolves VIDSOL-269
Checklist
[x] Branch is based on
develop(notmain).[ ] Resolves a
Known Issue.[ ] If yes, did you remove the item from the
docs/KNOWN_ISSUES.md?[x] Resolves an item reported in
Issues.If yes, which issue? 215