MrHertal / react-native-twilio-phone

Twilio Voice React Native module.
MIT License
154 stars 67 forks source link

#23 - Add toggleSpeaker method #24

Closed se1exin closed 3 years ago

se1exin commented 3 years ago

Adds support for toggling the speaker on/off during a call (Android and iOS). In my tests on both platforms the system resets the speaker state when a call is started, so it is safe to toggle on and then have the call end without toggling back off programmatically.

Usage: TwilioPhone.toggleSpeaker(true); // or false to go back to handset speaker

Also it looks like Xcode went and made a bunch of formatting changes to TwilioPhone.swift, sorry about that.

MrHertal commented 3 years ago

Thanks @se1exin 👍 I will take some time next week to review

MrHertal commented 3 years ago

Thanks a lot @se1exin

It works like a charm 🙂