Search code examples
iossafariwebrtcgetusermedia

Video stream is paused in iOS Safari 11 WebRTC/getUserMedia when in background?


It appears that Safari 11 on iOS will pause the video capturing during a WebRTC session when the browser/tab is moved into the background; meaning the remote client will just see a black image unless the video capturing browser tab is currently in focus. I can understand why it would do that*, but I could not find any official statement or documentation about this behaviour.

* (Both for privacy and resource conservation reasons.)

Is this the expected behaviour or is there anything that can be done about this?


Solution

  • It looks like expected behavior in our experience. Similarly, a native iOS app cannot capture video while in background.

    The behavior is the same on other platforms, e.g. Chrome on Android - both when backgrounding the browser or the WebRTC tab.