twilio / twilio-voice-react-native-app

Other
32 stars 15 forks source link

[VBLOCKS-1830] Audio device selection #88

Closed mhuynh5757 closed 1 year ago

mhuynh5757 commented 1 year ago

Submission Checklist

Description

This PR implements the store actions and components for proper audio device selection during a call.

Breakdown

Validation

Additional Notes

Figma link: https://www.figma.com/file/IFiFQzWEp1xyM2nuqJCkC2/2022-Q2-React-Voice-SDK?type=design&node-id=629-19201&mode=design&t=xDdnuaT6Fub1wU2Y-0

iPhone - Earpiece selected (no bluetooth device connected to iPhone at all)

Screenshot 2023-07-25 at 5 34 09 PM

iPhone - Speaker selected (with or without bluetooth device connected to iPhone)

Screenshot 2023-07-25 at 5 34 17 PM

iPhone - Bluetooth selected (with bluetooth device connected to iPhone)

Screenshot 2023-07-25 at 5 34 24 PM

Android - Earpiece selected

Android - Speaker selected

Note: unable to select earpiece on iPhone when bluetooth device is connected. Is this an iOS limitation? I can select the speaker when there is a bluetooth device, but not earpiece. Calling .select() on the earpiece will have the native layer do something and report an audio devices changed event, but the selected device is still bluetooth in that event and indeed the bluetooth device is still relaying audio.

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

charliesantos commented 1 year ago

@mhuynh5757 can you please attach some screenshots for each UI state for both platforms?

charliesantos commented 1 year ago

@mhuynh5757 do we have figma link handy?

charliesantos commented 1 year ago

@mhuynh5757 , can we get our Android and iOS members to verify the behavior? Android feels correct to me, but iOS seems odd. Looking at the iOS phone app, it should allow us to select earpiece properly even with bluetooth device connected.