amazon-chime-sdk-component-library-react icon indicating copy to clipboard operation
amazon-chime-sdk-component-library-react copied to clipboard

toggleContentShare should await or return the calls to audioVideo.startContentShare in ContentShareProvider

Open CodySchaaf opened this issue 1 year ago • 1 comments

What happened and what did you expect to happen?

When you call toggleContentShare if the user hasn't given permission you can't catch the error and display a helpful message to assist them in fixing their permissions.

https://github.com/aws/amazon-chime-sdk-component-library-react/blob/main/src/providers/ContentShareProvider/index.tsx#L131

The above code should either await or return the promises so that the caller can catch any error.

Have you reviewed our existing documentation?

Reproduction steps

  • Remove screen capture permissions for chosen browser
  • Call toggleContentShare
  • Either add a .catch or wrap in a try/catch
  • the provided exception handling will not be called

Amazon Chime SDK React Components Library version

3.4.0

What browsers are you seeing the problem on?

all

Browser version

all

Device Information

all

Meeting and Attendee ID Information.

No response

Browser console logs

Uncaught (in promise) DOMException: Permission denied by system

Add any other context about the problem here.

No response

CodySchaaf avatar Nov 14 '22 21:11 CodySchaaf