twilio / twilio-voice-react-native

Other
72 stars 27 forks source link

FM-499: fix audio device switch on Android #367

Closed cancit closed 4 months ago

cancit commented 4 months ago

Submission Checklist

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.

Description

AudioSwitch library requires calling .select and .activate functions to be called in order to switch between audio devices (like speakerphone to earpiece). As far as I see there is no existing way to call activate by using react native functions. I propose modifying voice_selectAudioDevice function so that it will immediately activate the device after selecting it.

Breakdown

Validation

Additional Notes

[Any additional comments, notes, or information relevant to reviewers.]

cancit commented 4 months ago

thank you @afalls-twilio, we are using a custom accept function and I missed that activate should be called before accepting the call. I added activate call there and now it works 👌