Open oney opened 9 years ago
I think @stefanalund and @Rugvip can probably figure this out. It's platform specific and we need to document how on Android and iOS.
iOS stops the camera when an app is put in to the background, but audio should be possible to keep alive. There's a specific background mode that needs to be enabled in the App Settings.
Yes, I expect that the app keeps audio talking in the background.
I add key Required background modes
that has App plays audio
and App provides Voice over IP services
item to Info.plist
. Unfortunately, it's not working.
It's interesting. I modify the code like this to use audio only, and when entering background mode, the app will keep audio connection. I can listen and send voice with each other.
[nativeHandler startGetCaptureSourcesForAudio:YES video:NO];
However, when entering background, iPhone won't show using audio view on the top. When I test Talky.io app, it will show like this.
So audio is running when in the background now?
Yes, it is.
We use OpenGL for video rendering in hybrid and native applications in case that gives any clues.
It could possibly be as simple as deregistering the nsview against the tag. And then reregistering again when coming back into focus. I think @rugvip has done something like that on Android but I'm not sure.
Perhaps I should ask if display of video resumes when you resume the app.
Sorry for all the questions and few answers, but did audio start working in the background when you went audio-only?
Yes, it did. Audio worked in the background when the app went audio-only.
I have already run ios/NativeDemo app in my iPhone, it works perfectly. However, when I press home button and the app enters the background mode, the connection is closed. How to continue running openwebrtc in the background? Thanks.