Socket
Socket
Sign inDemoInstall

vue-qrcode-reader

Package Overview
Dependencies
Maintainers
1
Versions
135
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.12 to 2.3.13

src/misc/shimGetUserMedia.js

6

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

@@ -34,3 +34,4 @@ "name": "Niklas Gruhn",

"core-js": "^3.6.5",
"vue": "^2.6.11"
"vue": "^2.6.11",
"webrtc-adapter": "7.7.0"
},

@@ -46,2 +47,3 @@ "devDependencies": {

"eslint-plugin-vue": "^6.2.2",
"husky": "^4.2.5",
"lint-staged": "^9.5.0",

@@ -48,0 +50,0 @@ "prettier": "^1.19.1",

import { StreamApiNotSupportedError, InsecureContextError } from "./errors.js";
import { imageDataFromVideo } from "./image-data.js";
import { eventOn, timeout } from "callforth";
import { indempotent } from "./util.js"
import shimGetUserMedia from "./shimGetUserMedia";

@@ -67,11 +67,2 @@ class Camera {

const applyWebRTCShim = indempotent(() => {
const script = document.createElement("script");
script.src = "https://webrtc.github.io/adapter/adapter-7.6.3.js";
document.head.appendChild(script);
return eventOn(script, "load");
});
export default async function(videoEl, { camera, torch }) {

@@ -94,3 +85,3 @@ // At least in Chrome `navigator.mediaDevices` is undefined when the page is

// is not available during SSR. So we lazily apply this shim at runtime.
await applyWebRTCShim()
await shimGetUserMedia();

@@ -102,3 +93,3 @@ const constraints = {

height: { min: 240, ideal: 480, max: 1080 },
...(await narrowDownFacingMode(camera)),
...(await narrowDownFacingMode(camera))
}

@@ -105,0 +96,0 @@ };

@@ -1,16 +0,15 @@

export const indempotent = action => {
let called = false
let result = undefined
let called = false;
let result = undefined;
return (...args) => {
if (called) {
return result
return result;
} else {
result = action(...args)
called = true
result = action(...args);
called = true;
return result
return result;
}
}
}
};
};
module.exports = {
css: { extract: false },
lintOnSave: false
lintOnSave: false,
transpileDependencies: ["webrtc-adapter"]
};

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

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 not supported yet

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