Skip to content

v5.0.0

Choose a tag to compare

@compeso-mgruenwald compeso-mgruenwald released this 09 Sep 11:45
· 17 commits to master since this release
20fadff

[5.0.0] - 2026-09-09

Breaking

  • Default camera is now a square 720×720 ideal preview (see default constraints below).
  • Default constraints are { facingMode: 'environment', width: { ideal: 720 }, height: { ideal: 720 }, aspectRatio: { ideal: 1 } }. 4.x was { facingMode: 'environment' }. Passing this prop still replaces the whole default.
  • Viewfinder is a component type or null. A React element no longer works. Omit it for the built-in overlay. Pass null to hide it.
  • Layout is CSS classes (rbs:*) and dist/style.css, imported from the package JS. The old inline STYLES object is gone.
  • doScan={false} or a failure unmounts <video> and shows camera-off. A retry needs doScan false then true, constraint values that deepEqual treats 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 at dist/style.css.

Changed

  • onLoad fires when the preview has HAVE_ENOUGH_DATA.
  • An object videoProps replaces the default video attributes, including style and className. Loaded-data handling stays with the library.