Socket
Socket
Sign inDemoInstall

react-barcode-qrcode-scanner

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-barcode-qrcode-scanner - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

6

dist/BarcodeScanner.js

@@ -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}

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc