Socket
Socket
Sign inDemoInstall

html5-qrcode-cv

Package Overview
Dependencies
42
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    html5-qrcode-cv

A cross platform HTML5 QR Code & bar code scanner


Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Html5-QRCode-Cv

Scanning only QR code with Html5Qrcode

export default function QrScanner() {

  useEffect(() => {
    const html5QrCode = new Html5Qrcode(
      "reader", {
      formatsToSupport: [Html5QrcodeSupportedFormats.QR_CODE],
      opencv: {
        modelAddr: "https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/wechat_qrcode"
      }
    }
    );
    const qrCodeSuccessCallback = (decodedText, decodedResult) => {
      /* handle success */
      console.log("decodedText:", decodedText);
    };
    const config = { fps: 10, qrbox: { width: 250, height: 250 } };

    // If you want to prefer back camera
    html5QrCode.start({ facingMode: "environment" }, config, qrCodeSuccessCallback);
    return () => {
      html5QrCode.stop();
    }
  }, [])



  return (
    <div>
      <div id='reader'></div>
    </div>
  );
}

Keywords

FAQs

Last updated on 22 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc