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

MeetingManager throws original error name from getUserMedia call #891

Merged
merged 1 commit into from
May 9, 2023

Conversation

xuesichao
Copy link
Contributor

Issue #888 :
We wrap the original error from getUserMedia with the general Error. It make it difficult for builders to handle the actual error. With this change, startAudioInputDevice, startVideoInputDevice, and setupDeviceLabelTrigger of MeetingManager now throw errors with the original error name returned by the getUserMedia call.

Description of changes:
startAudioInputDevice, startVideoInputDevice, and setupDeviceLabelTrigger of MeetingManager now throw errors with the original error name returned by the getUserMedia call.

For example, before this change the error thrown by startVideoInputDevice was:

{ 
  name: Error, 
  message: MeetingManager failed to select video input device
}

No it is:

{ 
  name: PermissionDeniedError, 
  message: MeetingManager failed to select audio input device. Permission denied by browser
}

Testing

  1. Have you successfully run npm run build:release locally?
    Yes

  2. How did you test these changes?

    1. Modified the roster-test-app to add buttons to call startAudioInputDevice, startVideoInputDevice manually.
    2. Block the browser device permission.
    3. Using roster test app to join a meeting.
    4. Verify the error log for setupDeviceLabelTrigger.
    5. Click button to trigger startAudioInputDevice, startVideoInputDevice and verify the error log.
  3. If you made changes to the component library, have you provided corresponding documentation changes?
    No doc needs to be changed.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xuesichao xuesichao requested a review from a team as a code owner May 4, 2023 22:32
Comment on lines -112 to -113

public getDeviceLabels() : DeviceLabels | DeviceLabelTrigger {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed accessibility modifier public because we have below eslint rule:

"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public",
"overrides": {
"parameterProperties": "explicit"
}
}
],

michhyun1
michhyun1 previously approved these changes May 5, 2023
@xuesichao xuesichao merged commit d3e26e1 into main May 9, 2023
@xuesichao xuesichao deleted the device-selection-error branch May 9, 2023 19:28
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.

3 participants