Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-qrcode-reader

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-qrcode-reader - npm Package Compare versions

Comparing version 2.3.2-alpha.2 to 2.3.2

2

package.json
{
"name": "vue-qrcode-reader",
"description": "A set of Vue.js components for detecting and decoding QR codes.",
"version": "2.3.2-alpha.2",
"version": "2.3.2",
"author": {

@@ -6,0 +6,0 @@ "name": "Niklas Gruhn",

import adapterFactory from "webrtc-adapter/src/js/adapter_factory.js";
import { StreamApiNotSupportedError, InsecureContextError } from "./errors.js";
import { imageDataFromVideo } from "./image-data.js";
import { eventOn, timeout } from "callforth";
import { eventOn } from "callforth";

@@ -22,2 +22,3 @@ class Camera {

const [track] = this.stream.getVideoTracks();
return track.getCapabilities();

@@ -124,14 +125,8 @@ }

// According to: https://oberhofer.co/mediastreamtrack-and-its-capabilities/#queryingcapabilities
// On some devices, getCapabilities only returns a non-empty object after
// some delay. There is no appropriate event so we have to add a constant timeout
await timeout(500);
if (torch) {
const [track] = stream.getVideoTracks();
const capabilities = track.getCapabilities();
if (capabilities.torch) {
track.applyConstraints({ advanced: [{ torch: true }] });
} else {
try {
await track.applyConstraints({ advanced: [{ torch: true }] });
} catch (error) {
console.warn("device does not support torch capability");

@@ -138,0 +133,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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