Microphone not reconnecting upon application unpause on iOS
Options
gergtrom
✭
in Photon Voice
I can see other players, I can hear other players, but they can't hear me.
iOS
join room - using autoconnectandjoin checkbox on PhotonVoiceNetwork
swipe to go to home screen, and come back
no more mic
in OnApplicationPause
tried a bunch of things (resetting mic, disconnecting/reconnectnig, never comes back?
What am I doing wrong!?
iOS
join room - using autoconnectandjoin checkbox on PhotonVoiceNetwork
swipe to go to home screen, and come back
no more mic
in OnApplicationPause
tried a bunch of things (resetting mic, disconnecting/reconnectnig, never comes back?
What am I doing wrong!?
0
Comments
-
Voice 2
2.15.0
PUN 2
2.17.1
Photon type
I am not sure if it happens on a demo scene right now. still trying to figure this out in my scene using the demo scene scripts been a long day and we aren't any closer0 -
Any update on this? Having the same issue. Thanks.0
-
Hi @gergtrom, @Grant,
Could you try adding the following code to the Recorder.csprivate bool wasRecordingBeforePause; [SerializeField] private bool stopRecordingInBackground = true; private void OnApplicationPause(bool paused) { if (this.Logger.IsInfoEnabled) { this.Logger.LogInfo("OnApplicationPause({0})", paused); } this.HandleApplicationPause(paused); } private void OnApplicationFocus(bool focused) { if (this.Logger.IsInfoEnabled) { this.Logger.LogInfo("OnApplicationFocus({0})", focused); } this.OnApplicationPause(!focused); } private void HandleApplicationPause(bool paused) { if (paused) { if (this.stopRecordingInBackground) { this.wasRecordingBeforePause = this.IsRecording; if (this.wasRecordingBeforePause) { if (this.Logger.IsInfoEnabled) { this.Logger.LogInfo("Stopping recording as application went to background"); } this.StopRecording(); } } } else if (this.wasRecordingBeforePause) { if (this.Logger.IsInfoEnabled) { this.Logger.LogInfo("Starting recording as application is back from background"); } this.StartRecording(); } }
0 -
never could figure that out - I did do something very similar to what you propose (though this looks like it might have worked)
I ended up going away from the PhotonVoiceNetwork and did the non PUN integration with adding a voiceconnection and a ConnectAndJoin script. those worked fine.
I don't think the PhotonVoiceNetwork script is handling the restart of the recorder properly out of the box0 -
Hi @gergtrom,
That's weird, PhotonVoiceNetwork extends VoiceConnection so not sure how it changes the behaviour here.
Just to be clear, this happens only on iOS?
Not in Unity Editor, not in macOS / Windows builds, not in Android?
Maybe simply the PUN or Voice clients are disconnected due to timeout.
Maybe the solution is to reconnect & rejoin the room?
0