@zxing/library
Advanced tools
Comparing version 0.14.1 to 0.14.2
@@ -21,3 +21,9 @@ import BinaryBitmap from '../core/BinaryBitmap'; | ||
readonly hasNavigator: boolean; | ||
/** | ||
* If mediaDevices under navigator is supported. | ||
*/ | ||
readonly isMediaDevicesSuported: boolean; | ||
/** | ||
* If enumerateDevices under navigator is supported. | ||
*/ | ||
readonly canEnumerateDevices: boolean; | ||
@@ -138,4 +144,2 @@ /** | ||
* @param decodeFn A callback for the decode method. | ||
* | ||
* @todo Return Promise<Result> | ||
*/ | ||
@@ -142,0 +146,0 @@ protected attachStreamToVideo(stream: MediaStream, videoSource: string | HTMLVideoElement): Promise<HTMLVideoElement>; |
@@ -84,2 +84,5 @@ "use strict"; | ||
Object.defineProperty(BrowserCodeReader.prototype, "isMediaDevicesSuported", { | ||
/** | ||
* If mediaDevices under navigator is supported. | ||
*/ | ||
get: function () { | ||
@@ -92,2 +95,5 @@ return this.hasNavigator && !!navigator.mediaDevices; | ||
Object.defineProperty(BrowserCodeReader.prototype, "canEnumerateDevices", { | ||
/** | ||
* If enumerateDevices under navigator is supported. | ||
*/ | ||
get: function () { | ||
@@ -281,4 +287,2 @@ return !!(this.isMediaDevicesSuported && navigator.mediaDevices.enumerateDevices); | ||
* @param decodeFn A callback for the decode method. | ||
* | ||
* @todo Return Promise<Result> | ||
*/ | ||
@@ -840,8 +844,8 @@ BrowserCodeReader.prototype.attachStreamToVideo = function (stream, videoSource) { | ||
try { | ||
// @NOTE Throws Exception if interrupted by a new loaded request | ||
// @note Throws Exception if interrupted by a new loaded request | ||
videoElement.srcObject = stream; | ||
} | ||
catch (err) { | ||
// @NOTE Avoid using this in new browsers, as it is going away. | ||
videoElement.src = window.URL.createObjectURL(stream); | ||
// @note Avoid using this in new browsers, as it is going away. | ||
videoElement.src = URL.createObjectURL(stream); | ||
} | ||
@@ -848,0 +852,0 @@ }; |
{ | ||
"name": "@zxing/library", | ||
"version": "0.14.1", | ||
"version": "0.14.2", | ||
"description": "TypeScript port of ZXing multi-format 1D/2D barcode image processing library.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22276
2687005