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

fix(ENGDESK-11008): asking for permission on the browser when calling methods that require audio output devices #203

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

DeividVeloso
Copy link
Contributor

  • asking for permission on the browser when calling methods that require audio output devices

πŸ“ To Do

  • All linters pass
  • All tests pass
  • Change documentation based on my changes

βœ‹ Manual testing

  1. Navigate to js/examples/react-audio-widget
  2. Run npm run setup and npm run storybook
  3. Access http://localhost:6006/?path=/story/utilities--examples in an incognito tab
  4. Click on Get output audio devices button and see if will prompt a modal asking for permission.
  5. Click in Allow and see if it returns the audio output device list

🦊 Browser testing

Desktop

  • Edge (latest)
  • Chrome
  • Firefox
  • Safari

πŸ“Έ Screenshots

Description Screenshot
Desktop image

@@ -29,7 +29,7 @@ const _constraintsByKind = (
kind: string = null
): { audio: boolean; video: boolean } => {
return {
audio: !kind || kind === DeviceType.AudioIn,
audio: !kind || kind === DeviceType.AudioIn || kind === DeviceType.AudioOut,
Copy link

Choose a reason for hiding this comment

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

Why are we using DeviceType.AudioOut?

Copy link
Contributor Author

@DeividVeloso DeividVeloso Sep 8, 2021

Choose a reason for hiding this comment

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

The SDK is using here getAudioOutDevices, to be able to list the Audio Out Put Devices, for do that we need to add the permission of {audio: true}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

Okay, just wanted to be sure this was intentional.

@DeividVeloso DeividVeloso requested a review from arghav September 8, 2021 18:31
@@ -29,7 +29,7 @@ const _constraintsByKind = (
kind: string = null
): { audio: boolean; video: boolean } => {
return {
audio: !kind || kind === DeviceType.AudioIn,
audio: !kind || kind === DeviceType.AudioIn || kind === DeviceType.AudioOut,
Copy link

Choose a reason for hiding this comment

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

Okay, just wanted to be sure this was intentional.

@DeividVeloso DeividVeloso merged commit b459307 into main Sep 8, 2021
@DeividVeloso DeividVeloso deleted the ENGDESK-11008 branch September 8, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants