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

VIDCS-2175: Should mitigate against publisher failures via permissions, hardware, or network failures by automatically retrying. (no ghost viewers, if retrying doesn’t work we fail)) #38

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

cpettet
Copy link
Contributor

@cpettet cpettet commented Jan 30, 2025

What is this PR doing?

Description

Currently, denying device permissions in the waiting room displays a prompt to change device permissions access. In the meeting room, denying device permissions destroys the publisher without notifying the user why.

After a Slack UX (or maybe it was during standup) review last year, we chose to redirect users to the goodbye page if they deny device permissions in the meeting room and to display an error message. To make it easier for our users, changing device permissions in the waiting room will force a page reload.

There's also a bit of light refactoring, a whole 'nother test file 🙃, and some additional unit tests.

Some screens of fixes

Screenshot 2025-01-30 at 4 28 15 PM
Screenshot 2025-01-30 at 4 28 02 PM

How should this be manually tested?

Repro'ing the issue
  • checkout main
  • go to meeting room
  • disable either camera or microphone
  • notice your publisher is destroyed with no warning
Testing the fix
Testing waiting room changes
  • checkout this branch
  • go to waiting room
  • deny camera or mic permissions
  • notice popup
  • re-enable the denied permission
  • notice page is reloaded and preview publisher is shown 🎉
Testing meeting room changes
  • go to meeting room
  • deny camera or mic permissions
  • observe a redirect to the goodbye page, with a message detailing why you're redirected

What are the relevant tickets?

Resolves VIDCS-2175

[ ] Resolves a Known Issue.
[ ] If yes, did you remove the item from the docs/KNOWN_ISSUES.md?
[ ] Resolves an item reported in Issues.
If yes, which issue? Issue Number?
[ ] If yes, did you close the item in Issues?

@github-actions github-actions bot changed the base branch from main to develop January 30, 2025 21:32
Comment on lines +189 to +192
(publisher: Publisher | null) => {
if (!publisher) {
return;
}
Copy link
Contributor Author

@cpettet cpettet Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why TS didn't catch this, but this can be null when we see a publishing error. Maybe it's because we specify err: unknown and then use the instanceof operator?

publisherRef.current = initPublisher(undefined, { insertDefaultUI: false }, (err: unknown) => {
if (err instanceof Error) {
publisherRef.current = null;
if (err.name === 'OT_USER_MEDIA_ACCESS_DENIED') {
console.error('initPublisher error: ', err);
}
}
});
addPublisherListeners(publisherRef.current);

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

Successfully merging this pull request may close these issues.

1 participant