flashphoner / wcs-ios-sdk-samples

7 stars 5 forks source link

loud speaker #11

Open uchup opened 5 months ago

uchup commented 5 months ago

Can I use the loudspeaker feature during a call on my phone? Because what I found uses audio calls with very low volume, is there any tutorial or example code to add a loudspeaker to Phonemin?

flashphoner commented 5 months ago

Good day. You can use setLoudSpeakerStatus method for streams only:

    @IBAction func loudSpeakerChanged(_ sender: Any) {
        do {
            try playStream?.setLoudspeakerStatus(loudSpeaker.isOn);
        } catch {
            print(error);
        }
    }

The feature is not supported for SIP calls

uchup commented 5 months ago

So for SIP calls on iPhone, you can't use the loudspeaker? can only use audio phone calls

flashphoner commented 5 months ago

We raised the ticket WCS-4048 to add loud speaker support for SIP calls. Will let you know about iOS SDK update.

flashphoner commented 1 month ago

Good day. We added the setLoudSpeakerStatus method fro SIP calls since iOS SDK build 2.6.124. Please see iOS Phone example description

- (void)useLoudSpeakerValueChanged:(id)sender {
    if (call) {
        [call setLoudspeakerStatus:_useLoudSpeaker.control.isOn withError:nil];
    }
}