react-barcode-qrcode-scanner
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -0,0 +0,0 @@ import { BarcodeReader, TextResult } from 'dynamsoft-javascript-barcode'; |
@@ -28,14 +28,16 @@ "use strict"; | ||
const init = () => __awaiter(void 0, void 0, void 0, function* () { | ||
if (props.license) { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.license = props.license; | ||
if (dynamsoft_javascript_barcode_1.BarcodeReader.isWasmLoaded() === false) { | ||
if (props.license) { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.license = props.license; | ||
} | ||
else { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.license = "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ=="; // public trial license | ||
} | ||
if (props.engineResourcePath) { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.engineResourcePath = props.engineResourcePath; | ||
} | ||
else { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.engineResourcePath = "https://unpkg.com/dynamsoft-javascript-barcode@latest/dist/"; | ||
} | ||
} | ||
else { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.license = "DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ=="; // public trial license | ||
} | ||
if (props.engineResourcePath) { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.engineResourcePath = props.engineResourcePath; | ||
} | ||
else { | ||
dynamsoft_javascript_barcode_1.BarcodeReader.engineResourcePath = "https://unpkg.com/dynamsoft-javascript-barcode@latest/dist/"; | ||
} | ||
reader.current = yield dynamsoft_javascript_barcode_1.BarcodeReader.createInstance(); | ||
@@ -42,0 +44,0 @@ if (props.runtimeSettings) { |
export * from "./BarcodeScanner"; | ||
export { BarcodeScanner }; | ||
import BarcodeScanner from "./BarcodeScanner"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "react-barcode-qrcode-scanner", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Barcode and QR Code Scanner Component for React.", | ||
@@ -18,2 +18,6 @@ "main": "dist/index.js", | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/", | ||
"access": "public" | ||
}, | ||
"keywords": [ | ||
@@ -20,0 +24,0 @@ "barcode", |
11933
170