dynamsoft-camera-enhancer
Advanced tools
Comparing version 3.1.0 to 3.2.0-iv-202211222105
@@ -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-iv-202211222105/dist/"; | ||
* ``` | ||
@@ -64,3 +64,3 @@ */ | ||
* ```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-iv-202211222105/dist/dce.ui.html"; | ||
* let pEnhancer = null; | ||
@@ -172,2 +172,8 @@ * (async()=>{ | ||
private _softwareScale; | ||
private _scaleCenter; | ||
private _focusParameters; | ||
private _tapFocusEnabled; | ||
private _focusSupported; | ||
private _focusArea; | ||
private _tapDoFocus; | ||
private _recordedStates; | ||
@@ -303,2 +309,5 @@ /** | ||
private _layerBaseCvs; | ||
private _drawingLayerOfTip; | ||
private _autoUpdateTip; | ||
onSuggestedTipChanged: (occasion: string, message: string) => void; | ||
/** | ||
@@ -665,3 +674,3 @@ * Set the scan region. | ||
*/ | ||
on(eventName: string, listener: Function): void; | ||
on(eventName: "cameraOpen" | "cameraClose" | "cameraChange" | "resolutionChange" | "played" | "singleFrameAcquired" | "frameAddedToBuffer", listener: Function): void; | ||
/** | ||
@@ -680,3 +689,3 @@ * Remove the specified event handler. | ||
*/ | ||
off(eventName: string, listener: Function): void; | ||
off(eventName: "cameraOpen" | "cameraClose" | "cameraChange" | "resolutionChange" | "played" | "singleFrameAcquired" | "frameAddedToBuffer", listener: Function): void; | ||
/** | ||
@@ -807,7 +816,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}); | ||
* ``` | ||
@@ -817,4 +839,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>; | ||
/** | ||
@@ -850,4 +886,17 @@ * Adjusts the frame rate. Only available in Chrome, Edge and Safari. | ||
* @category Camera Settings | ||
* @deprecated | ||
*/ | ||
setFocus(mode: string, distance?: number): Promise<void>; | ||
private _setFocus; | ||
setFocus(settings: string | { | ||
mode: string; | ||
distance?: number; | ||
area?: { | ||
centerPoint: { | ||
x: string; | ||
y: string; | ||
}; | ||
width?: string; | ||
height?: string; | ||
}; | ||
}, distance?: number): Promise<void>; | ||
/** | ||
@@ -861,8 +910,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(): void; | ||
disableTapToFocus(): void; | ||
isTapToFocusEnabled(): boolean; | ||
/** | ||
@@ -914,2 +967,6 @@ * Might be called when: | ||
scale?: number; | ||
scaleCenter?: { | ||
x: string; | ||
y: string; | ||
}; | ||
}): DCEFrame; | ||
@@ -958,2 +1015,3 @@ /** | ||
_createDrawingLayer(drawingLayerId?: number): import("./drawinglayer").default; | ||
deleteDrwaingLayer(drawingLayerId: number): void; | ||
createDrawingLayer(): import("./drawinglayer").default; | ||
@@ -968,2 +1026,6 @@ getDrawingLayer(drawingLayerId: number): import("./drawinglayer").default; | ||
clearDrawingLayers(): void; | ||
showTip(x: number, y: number, width: number, initialMessage?: string, autoShowSuggestedTip?: boolean): void; | ||
hideTip(): void; | ||
updateTipMessage(message: string): void; | ||
changeSuggestedTip(occasion: string, message: string): void; | ||
private _controler; | ||
@@ -970,0 +1032,0 @@ _createControler(): Controler; |
@@ -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; | ||
deleteDrwaingLayer(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-iv-202211222105", | ||
"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": { | ||
@@ -17,0 +20,0 @@ "name": "Dynamsoft", |
@@ -37,3 +37,3 @@ # Dynamsoft Camera Enhancer for Your Website | ||
```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-iv-202211222105/dist/dce.js"></script> | ||
``` | ||
@@ -44,3 +44,3 @@ | ||
```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-iv-202211222105/dist/dce.js"></script> | ||
``` | ||
@@ -110,4 +110,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()); | ||
})(); | ||
@@ -140,6 +141,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 | ||
@@ -146,0 +148,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1160863
5358
257
3