Alternative to getUserMedia() for reading live camera stream on iOS?

2017 update: Apple just announced that getUserMedia will finally be supported in iOS11.

Aug 2019 update: ONLY works in Safari, not in a WebView of any kind. Thanks @Klathmon for the comment.


The quaggaJS page has a feature compatibility matrix which answers your question:

enter image description here

getusermedia is not supported on iOS safari.

As per the quaggaJS documentation (https://github.com/serratus/quaggaJS#browser-support)

Quagga makes use of many modern Web-APIs which are not implemented by all browsers yet. There are two modes in which Quagga operates:

  1. analyzing static images and

  2. using a camera to decode the images from a live-stream. The latter requires the presence of the MediaDevices API. You can track the compatibility of the used Web-APIs for each mode:

    • Static Images
    • Live Stream

I would suggest that you use static image mode on iOS as live stream mode is not supported.