Skip to content

Releases: amareshsm/react-webcam-pro

v1.1.0 — Resolution Control, Mirrored Photos & Browser Fixes

06 Apr 19:23

Choose a tag to compare

🎯 Highlights

Custom Video Constraints (Resolution & Frame Rate)

Control camera resolution, frame rate, and any MediaTrackConstraints directly:

<Camera
  videoConstraints={{
    width: { ideal: 1920 },
    height: { ideal: 1080 },
    frameRate: { ideal: 30 },
  }}
/>

Upstream: #52

Mirrored Photo Capture

Capture a photo that matches the mirrored user-facing preview:

const photo = cameraRef.current.takePhoto({ mirror: true });
const imgData = cameraRef.current.takePhoto({ type: 'imgData', mirror: true });
// Legacy syntax still works
const photo = cameraRef.current.takePhoto('base64url');

Upstream: #74

Firefox & iOS 15 Safari Fix

The camera no longer crashes on Firefox and iOS 15 when getCapabilities() is missing. A console.warn is emitted instead so developers know what happened.

Upstream: #75, #77


📦 New Exports

Export Description
TakePhotoOptions Options object for takePhoto(){ type?, mirror? }

📝 Full Changelog

Features

  • ✅ New videoConstraints prop for resolution, frame rate, and other media constraints
  • ✅ New takePhoto({ mirror: true }) option for mirrored photo capture
  • ✅ New TakePhotoOptions type export
  • ✅ Interactive example app with live configuration panel

Bug Fixes

  • 🐛 Fixed crash on Firefox and iOS 15 Safari due to missing getCapabilities() API
  • 🐛 Changed silent error swallowing to console.warn for better developer experience

Tests

  • 🧪 69 tests total (9 new), zero console noise

🔄 Migration from v1.0.0

Zero breaking changes. Just update:

npm install react-webcam-pro@latest

📖 Full release notes

https://amareshsm.github.io/react-webcam-pro/docs/releases/v1.1.0

📦 npm

https://www.npmjs.com/package/react-webcam-pro

v1.0.0 - Prod Ready Community Edition

06 Apr 18:29

Choose a tag to compare

A community-maintained fork of react-camera-pro

✨ What's New:

  • React 19 support (compatible with React 16.8+, 17, 18, 19)
  • styled-components v6 support (backwards compatible with v5)
  • Fixed DOM warnings for mirrored and aspectRatio props
  • errorMessages prop is now truly optional
  • New className and style props for custom styling
  • Fixed camera switching with videoSourceDeviceId
  • Complete Jest test suite with React Testing Library
  • Modern dev toolchain (TypeScript 5, Rollup 4, Vite)

📱 Features:

  • Mobile-friendly (iOS, Android, standard webcams)
  • Fully responsive video container
  • Take photos as base64 JPEG or ImageData
  • Switch between user/environment cameras
  • Torch/flashlight support
  • Detect available cameras
  • TypeScript support with full types

🚀 Links: