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

dynamsoft-camera-enhancer

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamsoft-camera-enhancer - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0-beta-202212122121

LICENSE

106

dist/types/class/cameraenhancer.d.ts

@@ -39,3 +39,3 @@ import { PlayCallbackInfo } from '../interface/playcallbackinfo';

* ```js
* Dynamsoft.DCE.CameraEnhancer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.1.0/dist/";
* Dynamsoft.DCE.CameraEnhancer.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/";
* ```

@@ -52,2 +52,6 @@ */

static isDCEFrame(value: any): boolean;
static testCameraAccess(): Promise<{
ok: boolean;
message: string;
}>;
private _maxCvsSideLength;

@@ -65,3 +69,3 @@ private _defaultMaxCvsSideLength;

* ```js
* Dynamsoft.DCE.CameraEnhancer.defaultUIElementURL = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.1.0/dist/dce.ui.html";
* Dynamsoft.DCE.CameraEnhancer.defaultUIElementURL = "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/dce.ui.html";
* let pEnhancer = null;

@@ -173,2 +177,10 @@ * (async()=>{

private _softwareScale;
private _scaleCenter;
private _focusParameters;
private _tapFocusEnabled;
private _focusSupported;
private _focusArea;
private _tapDoFocus;
private _touchMoved;
private _touchMoveEvent;
private _recordedStates;

@@ -304,2 +316,7 @@ /**

private _layerBaseCvs;
private _drawingLayerOfTip;
private _tipStyleId;
private _tipArgs;
private _hideTipTimeoutId;
onTipSuggested: (occasion: string, message: string) => void;
/**

@@ -360,3 +377,3 @@ * Set the scan region.

*/
setViewDecorator(type: string | string[], area: Area): void;
setViewDecorator(type: "rectangle" | "focus" | "crossline" | "crosshair" | string[], area: Area): void;
/**

@@ -373,3 +390,3 @@ * Return the view decorator type, area and the decorator itself in a object.

*/
setViewDecoratorLineWidth(type: string, width: number): void;
setViewDecoratorLineWidth(type: "rectangle" | "focus" | "crossline" | "crosshair", width: number): void;
/**

@@ -379,3 +396,3 @@ * Set the stroke style for drawing the view decorator.

*/
setViewDecoratorStrokeStyle(type: string, style: string): void;
setViewDecoratorStrokeStyle(type: "rectangle" | "focus" | "crossline" | "crosshair", style: string): void;
/**

@@ -385,3 +402,3 @@ * Set the fill style for drawing the view decorator.

*/
setViewDecoratorFillStyle(type: string, style: string): void;
setViewDecoratorFillStyle(type: "rectangle" | "focus", style: string): void;
/**

@@ -391,3 +408,3 @@ * Set the fill style for drawing the mask for the view decorator.

*/
setViewDecoratorMaskFillStyle(type: string, style: string): void;
setViewDecoratorMaskFillStyle(type: "rectangle" | "focus", style: string): void;
/**

@@ -671,3 +688,3 @@ * Might be called when:

*/
on(eventName: string, listener: Function): void;
on(eventName: "cameraOpen" | "cameraClose" | "cameraChange" | "resolutionChange" | "played" | "singleFrameAcquired" | "frameAddedToBuffer", listener: Function): void;
/**

@@ -686,3 +703,3 @@ * Remove the specified event handler.

*/
off(eventName: string, listener: Function): void;
off(eventName: "cameraOpen" | "cameraClose" | "cameraChange" | "resolutionChange" | "played" | "singleFrameAcquired" | "frameAddedToBuffer", listener: Function): void;
/**

@@ -813,7 +830,20 @@ * Remove event handlers of specified type.

getExposureCompensation(): number;
private _setHardwareScale;
private _getHardwareScale;
private _setSoftwareScale;
private _getSoftwareScale;
private _setScaleCenter;
private _resetScaleCenter;
private _isVideoCenter;
/**
*
* @param value
* @deprecated
*/
private _setZoom;
/**
* Adjusts the zoom ratio.
* Only available when the camera is open.
* ```js
* await enhancer.setZoom(400);
* await enhancer.setZoom({factor: 2});
* ```

@@ -823,4 +853,18 @@ * @see [[getCapabilities]]

*/
setZoom(value: number): Promise<void>;
setZoom(settings: number | {
factor: number;
centerPoint?: {
x: string;
y: string;
};
}): Promise<void>;
/**
* @returns
* @deprecated
*/
getZoom(): number;
getZoomSettings(): {
factor: number;
};
resetZoom(): Promise<void>;
/**

@@ -847,2 +891,3 @@ * Adjusts the frame rate. Only available in Chrome, Edge and Safari.

getFrameRate(): number;
private _setFocus;
/**

@@ -858,3 +903,18 @@ * Adjusts the focus distance. Only available in Chrome and Edge.

*/
setFocus(mode: string, distance?: number): Promise<void>;
setFocus(settings: string | {
mode: string;
} | {
mode: "manual";
distance: number;
} | {
mode: "manual";
area: {
centerPoint: {
x: string;
y: string;
};
width?: string;
height?: string;
};
}, distance?: number): Promise<void>;
/**

@@ -868,8 +928,12 @@ * Get the focus distance.

* @category Camera Settings
* @deprecated
*/
getFocus(): Object;
private _setHardwareScale;
private _getHardwareScale;
private _setSoftwareScale;
private _getSoftwareScale;
getFocusSettings(): Object;
private _setFocusAndGetContract;
private _doFocusDetail;
private _setLocalFocus;
enableTapToFocus(): Promise<void>;
disableTapToFocus(): void;
isTapToFocusEnabled(): boolean;
/**

@@ -921,2 +985,6 @@ * Might be called when:

scale?: number;
scaleCenter?: {
x: string;
y: string;
};
}): DCEFrame;

@@ -948,2 +1016,3 @@ /**

getFrameFromBuffer(index?: number): DCEFrame;
clearFrameBuffer(): void;
/**

@@ -966,2 +1035,3 @@ * Force lose webgl context.

_createDrawingLayer(drawingLayerId?: number): import("./drawinglayer").default;
deleteDrawingLayer(drawingLayerId: number): void;
createDrawingLayer(): import("./drawinglayer").default;

@@ -976,2 +1046,6 @@ getDrawingLayer(drawingLayerId: number): import("./drawinglayer").default;

clearDrawingLayers(): void;
showTip(x: number, y: number, width: number, initialMessage?: string, duration?: number, autoShowSuggestedTip?: boolean): void;
hideTip(): void;
updateTipMessage(message: string): void;
suggestTip(occasion: string, message: string): void;
private _controler;

@@ -978,0 +1052,0 @@ _createControler(): Controler;

6

dist/types/class/drawingItem/drawingitem.d.ts

@@ -22,4 +22,6 @@ import { Note } from '../../interface/Note';

_getFabricObject(): fabric.Object;
on(eventName: string, listener: (event: DrawingItemEvent) => void): void;
off(eventName: string, listener: (event: DrawingItemEvent) => void): void;
_on(eventName: string, listener: (event: DrawingItemEvent) => void): void;
on(eventName: "mousedown" | "mouseup" | "dblclick" | "mouseover" | "mouseout", listener: (event: DrawingItemEvent) => void): void;
_off(eventName: string, listener: (event: DrawingItemEvent) => void): void;
off(eventName: "mousedown" | "mouseup" | "dblclick" | "mouseover" | "mouseout", listener: (event: DrawingItemEvent) => void): void;
_setEditable(editable: boolean): void;

@@ -26,0 +28,0 @@ hasNote(name: string): boolean;

@@ -14,3 +14,3 @@ import DrawingLayer from "./drawinglayer";

createDrawingLayer(baseCvs: HTMLCanvasElement, drawingLayerId?: number): DrawingLayer;
deleteDrwaingLayer(drawingLayerId?: number): void;
deleteDrawingLayer(drawingLayerId: number): void;
clearDrawingLayers(): void;

@@ -17,0 +17,0 @@ getDrawingLayer(drawingLayerId: number): DrawingLayer;

{
"name": "dynamsoft-camera-enhancer",
"version": "3.1.0",
"version": "3.2.0-beta-202212122121",
"description": "Allow your website to easily control cameras on desktop and mobile devices.",

@@ -15,2 +15,5 @@ "private": false,

"types": "dist/types/index.d.ts",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"author": {

@@ -44,3 +47,3 @@ "name": "Dynamsoft",

},
"license": "",
"license": "SEE LICENSE IN LICENSE",
"repository": {

@@ -69,4 +72,4 @@ "type": "git",

"detect-browser-node-ssr": "^2.0.0",
"dm-browser-info": "http://npm.dynamsoftwebtwain.com/dm-browser-info/-/dm-browser-info-1.0.7.tgz",
"dm-curscript-path": "http://npm.dynamsoftwebtwain.com/dm-curscript-path/-/dm-curscript-path-1.0.3.tgz",
"@scannerproxy/browser-info": "^1.0.7",
"@scannerproxy/curscript-path": "^1.0.3",
"inline-css": "^4.0.1",

@@ -73,0 +76,0 @@ "markdown-styles": "^3.2.0",

@@ -10,2 +10,3 @@ # Dynamsoft Camera Enhancer for Your Website

> See how Dynamsoft Camera Enhancer helps in camera control and video recognition:
>
> - **Barcode scanning from video stream**: check [Dynamsoft Barcode Reader JS User Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/?ver=latest)

@@ -16,13 +17,22 @@ > - **MRZ scanning and OCR from video stream**: check [Dynamsoft Label Recognizer JS User Guide](https://www.dynamsoft.com/label-recognition/programming/javascript/user-guide.html?ver=latest&utm_source=dceguide)

**Table of Contents**
- [Dynamsoft Camera Enhancer for Your Website](#dynamsoft-camera-enhancer-for-your-website)
- [Getting Started](#getting-started)
- [Include the SDK](#include-the-sdk)
- [Use a CDN](#use-a-cdn)
- [Host the SDK yourself](#host-the-sdk-yourself)
- [Interact with the SDK](#interact-with-the-sdk)
- [Create a `CameraEnhancer` object](#create-a-cameraenhancer-object)
- [Configure the `CameraEnhancer` object](#configure-the-cameraenhancer-object)
- [Customize the UI](#customize-the-ui)
- [Hosting the SDK](#hosting-the-sdk)
- [Step One: Deploy the dist folder](#step-one-deploy-the-dist-folder)
- [Step Two: Configure the Server](#step-two-configure-the-server)
- [Step Three: Include the SDK from the server](#step-three-include-the-sdk-from-the-server)
- [FAQ](#faq)
- [Can I open the web page directly from the hard drive?](#can-i-open-the-web-page-directly-from-the-hard-drive)
- [Why can't I use my camera?](#why-cant-i-use-my-camera)
- [API Documentation](#api-documentation)
- [Release Notes](#release-notes)
- [Next Steps](#next-steps)
* [Getting Started](#getting-started)
* [Include the SDK](#include-the-sdk)
* [Interact with the SDK](#interact-with-the-sdk)
* [Hosting the SDK](#hosting-the-sdk)
* [FAQ](#faq)
* [API Documentation](#api-documentation)
* [Release Notes](#release-notes)
* [Next Steps](#next-steps)
## Getting Started

@@ -36,14 +46,16 @@

* jsDelivr
- jsDelivr
```html
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.1.0/dist/dce.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@3.2.0/dist/dce.js"></script>
```
* UNPKG
- UNPKG
```html
<script src="https://unpkg.com/dynamsoft-camera-enhancer@3.1.0/dist/dce.js"></script>
<script src="https://unpkg.com/dynamsoft-camera-enhancer@3.2.0/dist/dce.js"></script>
```
> In some rare cases, you might not be able to access the CDN. If this happens, you can use (https://download2.dynamsoft.com/dce/dynamsoft-camera-enhancer-js/dynamsoft-camera-enhancer-js-3.2.0/dist/dce.js)[https://download2.dynamsoft.com/dce/dynamsoft-camera-enhancer-js/dynamsoft-camera-enhancer-js-3.2.0/dist/dce.js]
#### Host the SDK yourself

@@ -55,7 +67,7 @@

* From the website
- From the website
[Download the JavaScript Package](https://www.dynamsoft.com/camera-enhancer/downloads/1000021-confirmation/?utm_source=npm)
* yarn
- yarn

@@ -66,3 +78,3 @@ ```cmd

* npm
- npm

@@ -76,3 +88,3 @@ ```cmd

```html
<script src="/dce-js-3.1.0/dist/dce.js"></script>
<script src="/dce-js-3.2.0/dist/dce.js"></script>
```

@@ -114,4 +126,5 @@

let enhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance();
await enhancer.setUIElement(Dynamsoft.DCE.CameraEnhancer.defaultUIElementURL);
document.getElementById("enhancerUIContainer").appendChild(enhancer.getUIElement());
await enhancer.open();
document.getElementById("enhancerUIContainer").appendChild(enhancer.getUIElement());
})();

@@ -144,6 +157,7 @@ </script>

let enhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance();
// In order to get the UIElement to put on the page, call open() first.
// Sets the internally built UI element
await enhancer.setUIElement(Dynamsoft.DCE.CameraEnhancer.defaultUIElementURL);
// Gets the internally built UI element and add it to the page.
document.getElementById("enhancerUIContainer").appendChild(enhancer.getUIElement());
await enhancer.open();
// Gets the internally built UI element and bind it to an element on the page.
document.getElementById("enhancerUIContainer").appendChild(enhancer.getUIElement());
// The following line hides the close button

@@ -150,0 +164,0 @@ document.getElementsByClassName("dce-btn-close")[0].style.display = "none";

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

Sorry, the diff of this file is not supported yet

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