cybex-dev / twilio_voice

Flutter Twilio Voice Plugin
https://twilio-voice-web.web.app/
MIT License
39 stars 81 forks source link

[iOS] Poor call quality on iOS with a lot of jittery #235

Open kirilllapshev opened 4 months ago

kirilllapshev commented 4 months ago

Issue Summary

Hey when I make a call from/to iOS the quality of the call is very poor. I've tested it using Android and Web and it worked well.

I've also used the twilio_voice_quickstart just to make sure that the problems wasn't with the iOS package it self, and it's working fine.

Do you know how can I solve this? Am I the only one experiencing it?

Steps to Reproduce

  1. Make a call from/to an iOS device

Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead?

I'm using IPhone 13 Pro Max with iOS 17.4.1

kirilllapshev commented 4 months ago

I've discover that this issue is being cause by listening to the isHolding event, since is trigger the Hold function in the iOS code

jd-bus commented 4 months ago

Did you find a solution for this? Facing the same issue. Here's what it looks like for me:

flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
flutter: voip-onCallStateChanged CallEvent.unhold
flutter: voip-onCallStateChanged CallEvent.hold
jd-bus commented 4 months ago

@kirilllapshev by the way this issue is probably a dupe of #207 the maintainer has commented on that one also

kirilllapshev commented 4 months ago

Hey @jd-bus as I inspected the code the error lays in the iOS layer in the isOnHold event, that is triggering hold()

Here is the problem https://github.com/cybex-dev/twilio_voice/blob/master/ios/Classes/SwiftTwilioVoicePlugin.swift#L234-L236 when we listen to isOnHold we are not supposed to toggle call.isOnHold flag

@cybex-dev is there any specific reason to toggle it?

cybex-dev commented 1 month ago

Hey @jd-bus as I inspected the code the error lays in the iOS layer in the isOnHold event, that is triggering hold()

Here is the problem https://github.com/cybex-dev/twilio_voice/blob/master/ios/Classes/SwiftTwilioVoicePlugin.swift#L234-L236 when we listen to isOnHold we are not supposed to toggle call.isOnHold flag

@cybex-dev is there any specific reason to toggle it?

Great spotting, thank you!

Yes - this is erroneous and should not be toggled. I'll address in next update.