Repository navigation
v5.0.0
·
17 commits
to master
since this release
[5.0.0] - 2026-09-09
Breaking
- Default camera is now a square 720×720 ideal preview (see default
constraintsbelow). - Default
constraintsare{ facingMode: 'environment', width: { ideal: 720 }, height: { ideal: 720 }, aspectRatio: { ideal: 1 } }. 4.x was{ facingMode: 'environment' }. Passing this prop still replaces the whole default. Viewfinderis a component type ornull. A React element no longer works. Omit it for the built-in overlay. Passnullto hide it.- Layout is CSS classes (
rbs:*) anddist/style.css, imported from the package JS. The old inlineSTYLESobject is gone. doScan={false}or a failure unmounts<video>and shows camera-off. A retry needsdoScanfalse then true, constraint values thatdeepEqualtreats as different, or a remount.
Added
- Built-in viewfinder, a dimmed loader until
HAVE_ENOUGH_DATA, and a camera-off idle view. exports["./style.css"]points atdist/style.css.
Changed
onLoadfires when the preview hasHAVE_ENOUGH_DATA.- An object
videoPropsreplaces the default video attributes, includingstyleandclassName. Loaded-data handling stays with the library.