MrHertal / react-native-twilio-phone

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

Enable speaker while call in progress #23

Closed josipsarich closed 3 years ago

josipsarich commented 3 years ago

Is there a functionality to put call on a speaker? Something like: toggleSpeakerCall ?

Thanks for your work Kind regards, Josip

MrHertal commented 3 years ago

Hi 👋

You mean outside of native call UI? Currently no...

se1exin commented 3 years ago

I'm currently trying implement this, will create a PR if I get it to work.

MrHertal commented 3 years ago

Thanks @se1exin 👍

Looks like Twilio did that in the QuickStart app:

https://github.com/twilio/voice-quickstart-ios

It could help

se1exin commented 3 years ago

Thanks for the pointer @MrHertal. I've raised #24 which adds speaker toggle support.

josipsarich commented 3 years ago

@se1exin I think you should keep code structure, like:
toggleMuteCall(callSid: string, mute: boolean): void;

so you should have toggleSpeaker(callSid: string, mute: boolean): void;

but correct me if I'm wrong Thanks for the support 👍

se1exin commented 3 years ago

Thanks for the feedback @josipsarich, however the callSid parameter is not needed to toggle the device speaker. Adding it just so that it matches the other function signatures doesn't make much sense to me 😁

josipsarich commented 3 years ago

@MrHertal @se1exin I will close this issue, thank you both for the support, and help to resolve this feature :)

MrHertal commented 3 years ago

This is now available: https://github.com/MrHertal/react-native-twilio-phone/releases/tag/v1.5.0