Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.