amazon-chime-sdk-ios icon indicating copy to clipboard operation
amazon-chime-sdk-ios copied to clipboard

Alarm going off kills audio (session)

Open r00li opened this issue 3 years ago • 9 comments

Describe the bug If the user has an alarm/timer that goes off during an active call then the audio session gets stopped with unknown status code.

To Reproduce Steps to reproduce the behavior:

  1. Set an alarm under the clock app for near future
  2. Go to the app using amazon chime and connect to a call
  3. Wait for the previously set alarm to go off
  4. Dismiss the alarm notification by swiping up
  5. You cannot talk to other participants of the call anymore, after 30s audioSessionDidStopWithStatus(sessionStatus: MeetingSessionStatus) gets called with .unknown status.

Expected behavior Audio session would recover after user dismisses the alarm and the user would be able to continue their call normally.

Logs 2021-01-25 14:36:30.826794+0100 [ERROR] VideoChatVC - mic signal_buf_read timed out after 30 seconds 2021-01-25 14:36:30.827299+0100 [ERROR] VideoChatVC - media stream: mic tick failed; err=8 res=2 2021-01-25 14:36:30.830727+0100 [INFO] VideoChatVC - AudioClient State rawValue: 7 Unknown Status rawValue: 82 2021-01-25 14:36:31.335925+0100 [ERROR] VideoChatVC - xal_apple: timed out waiting for spk shutdown 2021-01-25 14:36:31.841063+0100 [ERROR] VideoChatVC - xal_apple: timed out waiting for mic shutdown

Test environment Info (please complete the following information):

  • Device: iPhone 8
  • OS: iOS 14.2
  • Version AmazonChimeSDK: 0.13.1
  • Version AmazonChimeSDKMedia: 0.9.0

Additional context User reports indicate that this occurs during other interruptions (like getting another call) as well, although we have not tested this.

r00li avatar Jan 25 '21 14:01 r00li

Thank you for opening the issue. Do you mind using Callkit and see if this works for you? Blogpost might help and our demo app also has an option to start meeting with callkit. I have tested and I can see the meeting still runs after alarm turns off.

Let me know if this works for you as well.

hokyungh avatar Jan 26 '21 06:01 hokyungh

Due to some product considerations (for example AppStore limitation on Chinese app store) we are still internally deciding if we should use callkit or not. It would be great if this could be fixed without us using callkit.

r00li avatar Jan 26 '21 10:01 r00li

Hi @r00li , Without CallKit, audio calling experience may be degraded because other applications that need access to AVAudioSession can take over and interrupt the audio calling. I'm not able to reproduce with Alarm, but I'm able to reproduce with a music app and phone call. We will consider as an enhancement to address this without CallKit

zhinang-amazon avatar Feb 18 '21 01:02 zhinang-amazon

I also met this issue. Alarms and phone calls kill the audio session with unknown code (78). It does not happen with iTunes music app.

I'm using React Native with the demo from this repo.

Doko-Demo-Doa avatar Mar 01 '21 17:03 Doko-Demo-Doa

Same here :(

Brekhunchenko avatar Jul 08 '21 07:07 Brekhunchenko

I'm seeing this occur without an alarm.

notapplicableio avatar Aug 03 '22 21:08 notapplicableio

Without CallKit, audio calling experience may be degraded. you could refer to the Amazon Chime SDK CallKit Integration blogpost, it will walk you through key steps to integrate Apple’s CallKit into your Customer Application. Thanks.

dingyishen-amazon avatar Aug 17 '22 18:08 dingyishen-amazon

Without CallKit, audio calling experience may be degraded. you could refer to the Amazon Chime SDK CallKit Integration blogpost, it will walk you through key steps to integrate Apple’s CallKit into your Customer Application. Thanks.

Closed under authorization URL. Can Y drop public URL?

Disconnecter avatar Aug 18 '22 07:08 Disconnecter

The link was updated, sorry for the inconvenience.

dingyishen-amazon avatar Aug 18 '22 17:08 dingyishen-amazon