
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.