azure-sdk-for-ios icon indicating copy to clipboard operation
azure-sdk-for-ios copied to clipboard

[BUG] Microphone Indicator is visible even the call is muted

Open eskizyen opened this issue 9 months ago • 2 comments

Describe the bug Orange microphone indicator is always visible after unmuting and muting the call again.

To Reproduce

  1. Accept an incoming call with outgoingAudioOptions muted. Microphone indicator is not visible.
  2. Unmute call. Microphone indicator is visible.
  3. Mute it again. Microphone indicator is visible.

Code Snippet

let options = AcceptCallOptions()
let audioOptions = OutgoingAudioOptions()
audioOptions.muted = true
options.outgoingAudioOptions = audioOptions

incomingCall?.accept(options: options) { }

call?.unmuteOutgoingAudio(completionHandler: { })
call?.muteOutgoingAudio(completionHandler: { })

Expected behavior Orange microphone indicator should be gone when call is muted.

Setup (please complete the following information):

  • OS: iOS 17.4.1
  • IDE : Xcode
  • 2.9.0

Additional context It is tested with several devices, iOS versions.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • [x ] Bug Description Added
  • [x ] Repro Steps Added
  • [x ] Setup information Added

eskizyen avatar Apr 29 '24 15:04 eskizyen

@raosanat can you please take a look?

tjprescott avatar Apr 29 '24 15:04 tjprescott

Hi @eskizyen, Are you using CallKit? Either via SDK or implementing by yourself?

Orange microphone indicator should be gone when call is muted.

That behavior is only present if we signal CallKit that call is muted, so in that case if you use call kit with SDK you would observe correct behavior.

lucianopa-msft avatar May 07 '24 16:05 lucianopa-msft

Thanks @lucianopa-msft, unfortunately using CallKit is not an option for me.

I think the real problem here is SDK still processes microphone input even the call is muted (speakingWhileMicrophoneIsMuted). Is there any way to disable this?

I am able to override this behaviour using AVAudioApplication.shared.setInputMuted(Bool), yet this class is introduced in iOS 17.

eskizyen avatar May 08 '24 07:05 eskizyen

I think the real problem here is SDK still processes microphone input even the call is muted (speakingWhileMicrophoneIsMuted). Is there any way to disable this?

Not through our APIs at the moment there isn't, and we cannot really change this behavior on mute action because we need mic input for speakingWhileMicrophoneIsMuted UFD.

I am able to override this behaviour using AVAudioApplication.shared.setInputMuted(Bool), yet this class is introduced in iOS 17.

Likely there is a way to do that in older OSes? Using a different API?

lucianopa-msft avatar May 08 '24 18:05 lucianopa-msft

Likely there is a way to do that in older OSes? Using a different API?

I couldn't find anything so far. Thanks for your time.

eskizyen avatar May 10 '24 06:05 eskizyen

As there is no action we can provide in this case, let's close this for now @eskizyen if you still think we can provide any assistance in this scenario feel free to reopen or open another issue if you need more support regarding other issues :)

lucianopa-msft avatar May 13 '24 18:05 lucianopa-msft