BrowserBarcodeReader.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = function (d, b) {
  3. extendStatics = Object.setPrototypeOf ||
  4. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  5. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  6. return extendStatics(d, b);
  7. };
  8. return function (d, b) {
  9. extendStatics(d, b);
  10. function __() { this.constructor = d; }
  11. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  12. };
  13. })();
  14. import { BrowserCodeReader } from './BrowserCodeReader';
  15. import MultiFormatOneDReader from '../core/oned/MultiFormatOneDReader';
  16. /**
  17. * @deprecated Moving to @zxing/browser
  18. *
  19. * Barcode reader reader to use from browser.
  20. */
  21. var BrowserBarcodeReader = /** @class */ (function (_super) {
  22. __extends(BrowserBarcodeReader, _super);
  23. /**
  24. * Creates an instance of BrowserBarcodeReader.
  25. * @param {number} [timeBetweenScansMillis=500] the time delay between subsequent decode tries
  26. * @param {Map<DecodeHintType, any>} hints
  27. */
  28. function BrowserBarcodeReader(timeBetweenScansMillis, hints) {
  29. if (timeBetweenScansMillis === void 0) { timeBetweenScansMillis = 500; }
  30. return _super.call(this, new MultiFormatOneDReader(hints), timeBetweenScansMillis, hints) || this;
  31. }
  32. return BrowserBarcodeReader;
  33. }(BrowserCodeReader));
  34. export { BrowserBarcodeReader };