Skip to the content.

Browser Support

Quagga2 makes use of many modern Web APIs which are not implemented by all browsers yet. This page details browser compatibility and required APIs.

Operating Modes

Quagga2 operates in two modes:

  1. Analyzing static images - Process existing image files
  2. Using a camera - Decode images from a live video stream

The latter requires the MediaDevices API for camera access.

Browser Compatibility

You can track the compatibility of the used Web APIs for each mode:

Static Image Mode

The following APIs must be supported by your browser:

Live Stream Mode

In addition to the APIs required for static images:

Secure Origins Required

Important: Accessing getUserMedia requires a secure origin in most browsers:

This is a browser security requirement. Read more in the Chrome M47 WebRTC Release Notes.

Feature Detection

Detecting getUserMedia Support

Every browser implements the mediaDevices.getUserMedia API differently. It’s highly recommended to include webrtc-adapter in your project for cross-browser compatibility.

How to test browser capabilities:

if (navigator.mediaDevices && typeof navigator.mediaDevices.getUserMedia === 'function') {
  // Safe to use getUserMedia
  console.log('Camera access is supported');
} else {
  // Camera access not available
  console.log('Camera access is NOT supported');
}

Browser Support Table

The above condition evaluates as follows:

Browser Result Notes
Chrome true Full support
Firefox true Full support
Edge true Full support
Safari iOS true Requires HTTPS
IE 11 false Not supported
Safari Desktop true macOS 11+

Known Issues

iOS Torch/Flash

Torch (flash) control via CameraAccess.enableTorch() and CameraAccess.disableTorch() does not work on iOS devices running version 16.4 and earlier. Support on later versions may vary.

Safari Limitations

Internet Explorer

Internet Explorer 11 and below do not support the MediaDevices API and cannot use live camera features. Static image decoding may work with polyfills, but this is not officially supported.

Recommendations

For best compatibility:

  1. Use HTTPS - Required for camera access on all non-localhost domains
  2. Include webrtc-adapter - Normalizes browser differences
  3. Feature detect - Check for API support before attempting to use camera
  4. Provide fallbacks - Offer file upload as alternative to camera access
  5. Test thoroughly - Browser behavior varies, especially on mobile

← Back to Reference