- Use .pause instead of copying the code
- Remove the unnecessary 300ms delay
- Avoid overwriting _offTimeout if another pause call happened shortly
before.
- Don't start the stream if is was paused.
- Merge deviceId and preferredFacingMode options into a single
option preferredCamera. Also previously, the deviceId took
precedence over the preferredFacingMode.
- .setCamera now also allows setting a preferred facingMode
instead of a deviceId.
Additinal fixes to PR#112:
- Correctly fallback to not applying any constraints in .start if
the preferredCamera (previously deviceId and preferredFacingMode)
is not available. Previously, if neither for the deviceId nor
the preferredFacingMode contraint a camera was found, no attempt
without a constraint was attempted.
- A add missing documentation for deviceId support in the constructor
to the Readme and generally adapt Readme for merged preferredCamera
option.
- Fix missing type for deviceId (now merged into preferredCamera) in
the constructor type definitions and generally adapt the types for
merged preferredCamera option.
- rename the method from getCameraList to listCameras
- make requesting labels (and the required camera permission) optional
- refactor hasCamera using listCameras
Additinal fixes to PR#112:
- add fallback labels for when no exact labels were requested
- remove unnecessary outer Promise
- make sure the created stream is always destroyed in a finally
Especially with the following changes:
- Attempt to fix Safari RangeError exceptions
- Support "structured append" qr codes
- Binarizer: adapt blackBias for slightly higher detection rate
- round scan region to whole pixel positions to avoid blurry
drawing at sub-pixel positions
- avoid clearing the canvas by resetting the canvas width or
height when they actually didn't change.
b3713f2 switched to starting to play immediately, without waiting for
a canplay event. The side effect of this is, that the play event (on
which the source rect is measured) is triggered before the video
is ready and the video dimensions known. To circumvent this, this
commit adds an additional source rect update on loadedmetadata.
- support for image urls and data urls
- support for stopping web cam scanning via stop()
- support for hasCamera() check
- documentation for optional scanImage() parameters
- update file sizes
- list web cam scanning out-of-the-box as a feature of this lib
New version of our jsQR-es6 fork has been updated to newest master
of cozmo/jsQR and merged in additional pull requests which are still
open in cozmo/jsQR. Also now makes the 'onlyInvert' inversion mode
usable.
- Add instructions to readme
- Update _flashOn after the flash was actually turned on or off
- Throw an error when trying to set the flash if not supported
- Make toggleFlash, turnFlashOn, turnFlashOff return a promise
- Throw an error when trying to detect flash support before the
video stream is available.
- Make change backwards compatible with previous consructor signature
- Fix demo to interpret errors as proper results
- Update types
- Do not report errors when the scanner is inactive
- Update readme
Improve the instructions for file-loader and add instructions for
raw-loader (see PR #60).
Co-authored-by: Gustavo Honorato <gustavohonorato@gmail.com>
Set these properties by default to disable picture in picture mode and to
enable inline playback on iPhones.
Co-authored-by: Alessandro Gatti <ale.gatti96@gmail.com>
The manual call of play() just after setting the video stream introduced in
the previous commit seems to suffice without the need to wait for the
canplay event.
Co-authored-by: shrpne <shrpne@gmail.com>