Bug 207888

Summary: getUserMedia camera input broken in Safari iOS 13.3.1
Product: WebKit Reporter: Ashley Gullen <ashley>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: iPhone / iPad   
OS: Unspecified   

Description Ashley Gullen 2020-02-18 05:15:53 PST
Using getUserMedia for video input appears to be broken in Safari iOS 13.3.1.

The problem is after approving a video request, it captures only a few frames and then freezes.

Repro URL: https://www.scirra.com/labs/cameratest2/index.html
Steps:
1. Press 'Get camera' button
2. Approve the permission request
3. Observe video preview

On iOS 13.3.1 this sporadically fails and causes the video preview to freeze. If you don't see the problem right away, try a couple of times, it usually happens after a few goes. As far as I can tell it works correctly in Chrome on Android and on Safari on macOS, so the problem is specific to iOS 13.

NOTE: I cannot reproduce the issue with a minimal getUserMedia demo displaying the camera directly to a <video> element. Our demo renders the camera input by uploading it to a WebGL texture, which may be related to the problem.

Once the video has frozen, the following actions can restore it back to working again:
a) Switch to a different Safari tab, then switch back again
b) Lock the device, and then unlock it
c) Tap the video icon in the address bar to block the video, and then tap it again to re-enable it

These seem to point to an issue with Safari failing to update the video stream while the camera is still live.
Comment 1 Radar WebKit Bug Importer 2020-02-18 15:23:20 PST
<rdar://problem/59568544>