Bug 180061

Summary: getUserMedia fails inconsistently with NotReadableError (DOM Exception 27): The I/O read operation failed.
Product: WebKit Reporter: Eric Davies <ericthecyclist>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: youennf
Priority: P2    
Version: Safari 11   
Hardware: Mac   
OS: macOS 10.13   
Attachments:
Description Flags
example code that calls getUserMedia none

Description Eric Davies 2017-11-27 16:50:47 PST
Created attachment 327714 [details]
example code that calls getUserMedia

I've included some sample code in the attachment.
What I'm observing is some really inconsistent behavior depending on where the page is hosted.

If the page is hosted "localhost" and develope/webrtc/allow insecure sites is enabled, then getUserMedia always succeeds.
If the page is hosted some sites (like https://webrtc.github.io/samples/src/content/getusermedia/gum/ ), again, it always succeeds.
If the page is hosted on our own https site (which Safari identifies as having a valid certificate), or bl.ocks.org (https://bl.ocks.org/EricDavies/32f085fab3e42ba9c6b3a799e4961c76 ) then once in a blue moon, it succeeds. Otherwise it fails with   "NotReadableError (DOM Exception 27): The I/O read operation failed.". The failure happens after its asked for permission to use the camera and the user has granted it.

Chrome and firefox work consistently in all scenarios.