Releases: amareshsm/react-webcam-pro
Releases · amareshsm/react-webcam-pro
v1.1.0 — Resolution Control, Mirrored Photos & Browser Fixes
🎯 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.
📦 New Exports
| Export | Description |
|---|---|
TakePhotoOptions |
Options object for takePhoto() — { type?, mirror? } |
📝 Full Changelog
Features
- ✅ New
videoConstraintsprop for resolution, frame rate, and other media constraints - ✅ New
takePhoto({ mirror: true })option for mirrored photo capture - ✅ New
TakePhotoOptionstype 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.warnfor 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
v1.0.0 - Prod Ready Community Edition
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: