
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
webscan-qrcode
Advanced tools
基于instascan的扩展扫描类库。instascan在华为设备上有问题。这里做了一些合并和改造。类库采用umd方式进行打包,所以导入方式支持多种
npm i webscan-qrcode -S
<script src="./dist/WebscanQrcode.bundle.js"></script>
import WebscanQrcode from "webscan-qrcode";
html代码:
<video id="preview" autoplay controls="true" webkit-playsinline="true" playsinline="true"></video>
javascript:代码:
var allCameras = [];
var activeCamera = null
var scanner = new WebscanQrcode.Scanner({
video: document.getElementById('preview'),
scanPeriod: 5,
mirror:false,//不用镜像模式,镜像模式类似于镜子
});
scanner.addListener('scan', function (content, image) {
console.log({ date: +Date.now(), content: content });
});
WebscanQrcode.Camera.getCameras()
.then(function (cameras) {
allCameras = cameras
activeCamera = cameras[0]
//开始扫描的方法
scanner.start(activeCamera,'auto')
})
.catch(function (e) {
alert('error message:'+e)
console.error(e);
});
FAQs
Webcam-driven QR code scanner.
We found that webscan-qrcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.