Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audioSession deActive suddenly before joining call #214

Open
fukemy opened this issue Feb 20, 2023 · 2 comments
Open

audioSession deActive suddenly before joining call #214

fukemy opened this issue Feb 20, 2023 · 2 comments

Comments

@fukemy
Copy link

fukemy commented Feb 20, 2023

Hi, sometimes I got no sounds when on audiocall with IOS, then after check log, I saw audioSession deActive suddenly called, I dont know why, can u help?

2023-02-20 11:07:06.209401+0700 VedaxLink[48872:11061163] RNInCallManager.start() start InCallManager. media=audio, type=audio, mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.211151+0700 VedaxLink[48872:11061163] RNInCallManager.storeOriginalAudioSetup(): origAudioCategory=AVAudioSessionCategoryPlayAndRecord, origAudioMode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.212496+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionNotification() starting...
2023-02-20 11:07:06.212548+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionInterruptionNotification()
2023-02-20 11:07:06.212588+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionRouteChangeNotification()
2023-02-20 11:07:06.212619+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionMediaServicesWereLostNotification()
2023-02-20 11:07:06.212649+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionMediaServicesWereResetNotification()
2023-02-20 11:07:06.212673+0700 VedaxLink[48872:11061163] RNInCallManager.startAudioSessionSilenceSecondaryAudioHintNotification()
2023-02-20 11:07:06.213938+0700 VedaxLink[48872:11061163] RNInCallManager.start:auto:ringbackUriType:: audioSession.setCategory: AVAudioSessionCategoryPlayAndRecord, withOptions: 0 success
2023-02-20 11:07:06.214494+0700 VedaxLink[48872:11061163] RNInCallManager.start:auto:ringbackUriType:: audioSession.setMode(AVAudioSessionModeVoiceChat) success
2023-02-20 11:07:06.215430+0700 VedaxLink[48872:11061163] RNInCallManager.start:auto:ringbackUriType:: audioSession.setActive(YES), withOptions: 0 success
2023-02-20 11:07:06.215516+0700 VedaxLink[48872:11061163] RNInCallManager.startProximitySensor()
2023-02-20 11:07:06.215618+0700 VedaxLink[48872:11061163] RNInCallManager.setKeepScreenOn(): enable: YES
2023-02-20 11:07:06.281994+0700 VedaxLink[48872:11059104] [javascript] '_ContactCallUpdateSubStatus success', undefined
2023-02-20 11:07:06.288411+0700 VedaxLink[48872:11059104] [javascript] singlecall inited
2023-02-20 11:07:06.289781+0700 VedaxLink[48872:11059104] [javascript] 'newcallstate', 'Connecting...'
2023-02-20 11:07:06.341907+0700 VedaxLink[48872:11058862] [RNCallKeep][CXProviderDelegate][provider:didActivateAudioSession]
2023-02-20 11:07:06.351753+0700 VedaxLink[48872:11058862] RNInCallManager.AudioSessionInterruptionNotification: Ended
2023-02-20 11:07:06.351785+0700 VedaxLink[48872:11058862] [RNCallKeep][configureAudioSession] Activating audio session
2023-02-20 11:07:06.392997+0700 VedaxLink[48872:11058862] [[RNCallKeep]] sendEventWithNameWrapper: RNCallKeepDidActivateAudioSession, hasListeners : YES
2023-02-20 11:07:06.395774+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.Reason: CategoryChange. category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.396178+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): [Enter] forceSpeakerOn flag=0 media=audio category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.396544+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): did NOT overrideOutputAudioPort()
2023-02-20 11:07:06.396652+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio category
2023-02-20 11:07:06.396668+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio mode
2023-02-20 11:07:06.396681+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: End
2023-02-20 11:07:06.396694+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: Unknow Value
2023-02-20 11:07:06.430938+0700 VedaxLink[48872:11059104] [javascript] socket connect now
2023-02-20 11:07:06.442994+0700 VedaxLink[48872:11059104] [javascript] 'send keepalive ios now', true
2023-02-20 11:07:06.443017+0700 VedaxLink[48872:11059104] [javascript] send keepalive ios now
2023-02-20 11:07:06.443065+0700 VedaxLink[48872:11059104] [javascript] 'setKeepAliveTimeout now', 5230
2023-02-20 11:07:06.461923+0700 VedaxLink[48872:11059104] [javascript] start initAudioRoom
2023-02-20 11:07:06.461993+0700 VedaxLink[48872:11059104] [javascript] JanusAudioBridgePulgin inited
2023-02-20 11:07:06.462968+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 ctor +11s
2023-02-20 11:07:06.463069+0700 VedaxLink[48872:11059104] [javascript] janus plugin connect
2023-02-20 11:07:06.467930+0700 VedaxLink[48872:11058862] [native] [GESTURE HANDLER] Initialize gesture handler for view <RNSScreenView: 0x10ae2ffd0; reactTag: 3653; frame = (0 0; 390 844); autoresize = W+H; gestureRecognizers = <NSArray: 0x280a4f450>; animations = { UIPacingAnimationForAnimatorsKey=<CABasicAnimation: 0x2805cf6e0>; position=<CASpringAnimation: 0x2805cc280>; }; layer = <CALayer: 0x2804e9f00>>
2023-02-20 11:07:06.487439+0700 VedaxLink[48872:11059104] [javascript] 'setOnParticipantsListener', [ { id: 6256408643567800,
    displayName: '48f02cbe-efe1-4eca-9652-a0582a20c1a4_1676866022650',
    isTalking: false,
    isMuted: false,
    didSetup: true } ]
2023-02-20 11:07:06.487553+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 addTrack +25ms
2023-02-20 11:07:06.488513+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 createOffer +1ms
2023-02-20 11:07:06.488708+0700 VedaxLink[48872:11059104] [javascript] negotiationneeded
2023-02-20 11:07:06.489240+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 createOffer OK +1ms
2023-02-20 11:07:06.489296+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 setLocalDescription +0ms
2023-02-20 11:07:06.489715+0700 VedaxLink[48872:11059104] [javascript] 'signalingState', 'janus.plugin.audiobridge', 5942734482099627, 'have-local-offer'
2023-02-20 11:07:06.490554+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 setLocalDescription OK +1ms
2023-02-20 11:07:06.505492+0700 VedaxLink[48872:11059104] [javascript] rn-webrtc:pc:DEBUG 4 setRemoteDescription +15ms
2023-02-20 11:07:06.505976+0700 VedaxLink[48872:11059104] [javascript] 'signalingState', 'janus.plugin.audiobridge', 5942734482099627, 'stable'
2023-02-20 11:07:06.649083+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.Reason: CategoryChange. category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.649389+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): [Enter] forceSpeakerOn flag=0 media=audio category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:06.649915+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): did NOT overrideOutputAudioPort()
2023-02-20 11:07:06.650105+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio category
2023-02-20 11:07:06.650157+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio mode
2023-02-20 11:07:06.650183+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: End
2023-02-20 11:07:06.650197+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: Unknow Value
2023-02-20 11:07:06.723901+0700 VedaxLink[48872:11059104] [javascript] 'iceconnectionstate', 'janus.plugin.audiobridge', 5942734482099627, 'checking'
2023-02-20 11:07:06.741081+0700 VedaxLink[48872:11059104] [javascript] 'fcm onMessage', { RoomId: '48f02cbeefe14eca9652a0582a20c1a47ea53b20d993453c9f005bc057580b32',
  CallerId: '48f02cbe-efe1-4eca-9652-a0582a20c1a4',
  CallId: 'KgLTHP5CxUCZi2xvmLAuMw',
  Cmd: 'HideCallScreen' }
2023-02-20 11:07:06.741139+0700 VedaxLink[48872:11059104] [javascript] 'fcm onMessageroute name', 'SingleCall'
2023-02-20 11:07:06.741211+0700 VedaxLink[48872:11059104] [javascript] report stop calling ios now
2023-02-20 11:07:06.741439+0700 VedaxLink[48872:11060779] [RNCallKeep] isCallActive 48F02CBE-EFE1-4ECA-9652-A0582A20C1A4 1 ?
2023-02-20 11:07:06.929733+0700 VedaxLink[48872:11059104] [javascript] audioRoom OnWebRTCUpListener
2023-02-20 11:07:07.101532+0700 VedaxLink[48872:11059104] [javascript] 'NotifyJsonStr', 'RoomContactAcceptCall'
2023-02-20 11:07:07.104082+0700 VedaxLink[48872:11059104] [javascript] 'NotifyJsonStr', 'RoomChatMsgReadedByUser'
2023-02-20 11:07:07.458344+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.Reason: CategoryChange. category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:07.458571+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): [Enter] forceSpeakerOn flag=0 media=audio category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:07.464949+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): audioSession.overrideOutputAudioPort(.None) success
2023-02-20 11:07:07.465280+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio category
2023-02-20 11:07:07.465346+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio mode
2023-02-20 11:07:07.465381+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: End
2023-02-20 11:07:07.465421+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: Unknow Value
2023-02-20 11:07:07.483974+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.Reason: CategoryChange. category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:07.484151+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): [Enter] forceSpeakerOn flag=0 media=audio category=AVAudioSessionCategoryPlayAndRecord mode=AVAudioSessionModeVoiceChat
2023-02-20 11:07:07.485392+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute(): audioSession.overrideOutputAudioPort(.None) success
2023-02-20 11:07:07.485703+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio category
2023-02-20 11:07:07.485724+0700 VedaxLink[48872:11058862] RNInCallManager.updateAudioRoute() did NOT change audio mode
2023-02-20 11:07:07.485737+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: End
2023-02-20 11:07:07.485749+0700 VedaxLink[48872:11058862] RNInCallManager.AudioRouteChange.SilenceSecondaryAudioHint: Unknow Value
2023-02-20 11:07:07.500758+0700 VedaxLink[48872:11058862] [RNCallKeep][CXProviderDelegate][provider:didDeactivateAudioSession]
2023-02-20 11:07:07.500784+0700 VedaxLink[48872:11058862] [[RNCallKeep]] sendEventWithNameWrapper: RNCallKeepDidDeactivateAudioSession, hasListeners : YES
2023-02-20 11:07:07.500958+0700 VedaxLink[48872:11059104] [javascript] 'connectionState', 'connecting'
2023-02-20 11:07:07.502066+0700 VedaxLink[48872:11059104] [javascript] 'connectionState', 'connected'

When user press answer incomming call, i call Incallmanager,start():

 if(Platform.OS === 'ios'){
      InCallManager.start({media: isVideo ? 'video' : 'audio'})
    }
@maharjanaman
Copy link

@fukemy did you manage to solve this?

@fukemy
Copy link
Author

fukemy commented Feb 21, 2024

it's seem IOS 13 problem, it's gone after upgrade to 14, dont know why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants