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

video-preview: improvements to error handling (#9943) and cleanups #11068

Merged

Conversation

prlanzarin
Copy link
Member

What does this PR do?

This is a port of a work done by @CristianSilvaGrosseli and @pedrobmarin that improves overall video-preview error handling, display and code quality. In detail:

  • Fixes Webcam Not Selectable in Chrome #9943: don't block device enumeration when a device among the list fails for whatever reason
  • Localize video-preview error messages
    • They were in a weird state where they were dumped straight out of the getUserMedia rejection error into the client UI
    • Added a generic error locale to dump unmapped errors into the UI (with the raw error appended to it for support purposes)
  • Add a getUserMedia timeout to go around misbehaving browsers and/or video drivers
    • There's always reports that come and go about Chromium based browsers not resolving nor rejecting getUserMedia calls. Generally on Windows 10/ChromeOS endpoints.
    • That would make the video-preview get stuck into the Finding webcams... state, rendering it useless even if you had a second working camera to use
    • The timeout is configurable (Meteor.settings.public.kurento.gUMTimeout). When the timeout expires, an error is shown in the UI and the rest of the devices are enumerated and iterated upon.
    • The timeout is intentionally large (20 seconds) because we can't differentiate the buggy scenario and a first time user that's taking a bit long to make sense of how to accept the browser's camera permission prompt (Allow/Deny).
    • Timeout can be disabled by setting it to Infinity.
  • Stale code cleanup
  • Logging improvements

Closes Issue(s)

closes #9943

More

Co-authored-by @CristianSilvaGrosseli
Co-authored-by: @pedrobmarin

The first getUserMedia was not supposed to be considered critical to the whole
video preview flow.

Scenarios where the user has multiple media sources and one of them was already
in use or had some malfunction problem were forcing a global skip at the video
preview modal even if one of them was available to be used.
Some browsers seem to (occasionally) not return the getUserMedia promise call and the
user gets stuck in this state unable to share her/his webcam.

Since enumerateDevices still works even on a gUM rejection this includes a racing
timeout that skips gUM. Configured at settings `gUMTimeout`.

Reproduced with Windows 10 Chrome 87.
Otherwise users who took long enough to accept the gUM permission prompt would fall into the workaround
It seems the video-preview generic error fallback locale (to handle unexpected errors on our side which do not inherently come from gUM calls) was removed by accident. Adding it back.
@ffdixon ffdixon merged commit 073a04e into bigbluebutton:v2.2.x-release Dec 22, 2020
@prlanzarin prlanzarin mentioned this pull request Apr 3, 2021
@prlanzarin prlanzarin deleted the u22-videopreview-fixes branch October 24, 2021 14:40
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.

None yet

4 participants