Skip to content

Releases: shivantra/react-web-camera

v1.2.0

28 Apr 07:45

Choose a tag to compare

Fix

  • Corrected releaseStream to stop tracks directly without calling stream.removeTrack() first, which was incorrectly mutating the stream and could fire unexpected
    removetrack events.

Features

  • Added stop() method to WebCameraHandler — lets consumers explicitly release the camera stream, turning off the device LED and freeing the hardware for other components
    or tabs.
  • Refactored internal stream management: replaced stream state with a streamRef for synchronous access in cleanup, added onErrorRef to stabilize the error callback and
    prevent unnecessary camera restarts, and introduced a cancelled flag to handle race conditions when getUserMedia resolves after the effect is torn down.

Examples

  • Updated desktop and mobile dialog examples (Next.js + Vite) to call stop() on both save and close, so the camera is released when the dialog is dismissed.

v1.0.0

27 Aug 11:54

Choose a tag to compare

Release v1.0.0