react-barcode-qrcode-scanner
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -37,3 +37,3 @@ "use strict"; | ||
if (props.runtimeSettings) { | ||
yield reader.current.updateRuntimeSettings(props.runtimeSettings); | ||
yield reader.current.initRuntimeSettingsWithString(props.runtimeSettings); | ||
} | ||
@@ -49,3 +49,3 @@ if (props.onInitialized) { | ||
if (props.runtimeSettings && reader.current) { | ||
reader.current.updateRuntimeSettings(props.runtimeSettings); | ||
reader.current.initRuntimeSettingsWithString(props.runtimeSettings); | ||
} | ||
@@ -116,3 +116,3 @@ }, [props.runtimeSettings]); | ||
} }))), | ||
barcodeResults.map((result, idx) => (react_1.default.createElement("text", { key: "text-" + idx, xmlns: "<http://www.w3.org/2000/svg>", x: result.localizationResult.x1, y: result.localizationResult.y1, fill: "red", "font-size": "20" }, result.barcodeText))))); | ||
barcodeResults.map((result, idx) => (react_1.default.createElement("text", { key: "text-" + idx, xmlns: "<http://www.w3.org/2000/svg>", x: result.localizationResult.x1, y: result.localizationResult.y1, fill: "red", fontSize: "20" }, result.barcodeText))))); | ||
} | ||
@@ -119,0 +119,0 @@ }; |
{ | ||
"name": "react-barcode-qrcode-scanner", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "Barcode and QR Code Scanner Component for React.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,3 +23,3 @@ # react-barcode-qrcode-scanner | ||
const [isPause,setIsPause] = React.useState(false); //whether the video is paused | ||
const [runtimeSettings,setRuntimeSettings] = React.useState("{\"ImageParameter\":{\"BarcodeFormatIds\":[\"BF_QR_CODE\"],\"Description\":\"\",\"Name\":\"Settings\"},\"Version\":\"3.0\"}"); //use JSON template to decode QR codes only | ||
const onOpened = (cam:HTMLVideoElement,camLabel:string) => { // You can access the video element in the onOpened event | ||
@@ -58,2 +58,3 @@ console.log("opened"); | ||
desiredResolution={{width:1280,height:720}} | ||
runtimeSettings={runtimeSettings} | ||
onScanned={onScanned} | ||
@@ -60,0 +61,0 @@ onClicked={onClicked} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11610
83