@scandit/web-datacapture-core 8.3.0-beta.1 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/electron/common.cjs +1 -1
- package/build/electron/constants.cjs +1 -1
- package/build/electron/main.cjs +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/js/{Camera-BnPnXqAt.d.ts → Camera-Cc__1Nc-.d.ts} +2 -0
- package/build/js/Camera.d.ts +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/{DataCaptureContext-LM_Re1B4.d.ts → DataCaptureContext-BcSpF9Dt.d.ts} +2 -1
- package/build/js/DataCaptureContext.d.ts +2 -2
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +2 -2
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +2 -2
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +2 -2
- package/build/js/ImageFrameSource.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/NotificationPresenter/index.d.ts +2 -2
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +2 -2
- package/build/js/NotificationPresenter/private/presets.d.ts +2 -2
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/SingleImageUploader.d.ts +1 -1
- package/build/js/Sound.d.ts +4 -0
- package/build/js/Sound.js +1 -1
- package/build/js/chunks/chunk-22UMTZI6.js +1 -0
- package/build/js/chunks/{chunk-H7FKC2FI.js → chunk-2MK5Y4IL.js} +1 -1
- package/build/js/chunks/chunk-6AQGNP4S.js +1 -0
- package/build/js/chunks/chunk-6IHWEHG3.js +1 -0
- package/build/js/chunks/chunk-AAPD5YU3.js +1 -0
- package/build/js/chunks/chunk-AKGGJKCA.js +35 -0
- package/build/js/chunks/chunk-EEWGHHL4.js +1 -0
- package/build/js/chunks/{chunk-OCKYBUXO.js → chunk-EIOVYBFS.js} +1 -1
- package/build/js/chunks/chunk-EYBP3672.js +1 -0
- package/build/js/chunks/{chunk-BQO4QYI6.js → chunk-F3Y2X52X.js} +1 -1
- package/build/js/chunks/chunk-HHA4HDG5.js +6 -0
- package/build/js/chunks/{chunk-RYXKMXTY.js → chunk-HILZP6OW.js} +1 -1
- package/build/js/chunks/chunk-LV6LGCDC.js +1 -0
- package/build/js/chunks/chunk-NYYGU4ZV.js +1 -0
- package/build/js/chunks/{chunk-XVH5A2QH.js → chunk-PDJEYYPX.js} +1 -1
- package/build/js/chunks/chunk-QHBYNYWX.js +1 -0
- package/build/js/chunks/{chunk-M2ZQCUEL.js → chunk-QHNV2CFJ.js} +1 -1
- package/build/js/chunks/{chunk-7EGT56UE.js → chunk-QMLTR5JH.js} +1 -1
- package/build/js/chunks/chunk-QWKATH4N.js +1 -0
- package/build/js/chunks/chunk-RY2EW3RR.js +1 -0
- package/build/js/chunks/{chunk-IVQL2BYY.js → chunk-S2GRD6GO.js} +1 -1
- package/build/js/chunks/chunk-SJIN27Q5.js +1 -0
- package/build/js/chunks/{chunk-7ZU6DPLL.js → chunk-VWEJFI2M.js} +1 -1
- package/build/js/chunks/{chunk-YXXMWHFX.js → chunk-X653DLOR.js} +1 -1
- package/build/js/chunks/chunk-Y3TODCJD.js +1 -0
- package/build/js/chunks/chunk-ZAXZRQYF.js +1 -0
- package/build/js/controls/CameraFOVSwitchControl.d.ts +2 -2
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.d.ts +2 -2
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/TorchSwitchControl.d.ts +2 -2
- package/build/js/controls/TorchSwitchControl.js +1 -1
- package/build/js/controls/common.d.ts +2 -2
- package/build/js/controls/index.d.ts +2 -2
- package/build/js/controls/index.js +1 -1
- package/build/js/defaults/DefaultsCamera.d.ts +2 -2
- package/build/js/defaults/DefaultsCameraSettings.d.ts +1 -1
- package/build/js/global.d.d.ts +1 -0
- package/build/js/index.d.ts +2 -2
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.d.ts +2 -2
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraManager.d.ts +2 -2
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CameraPool.d.ts +3 -2
- package/build/js/private/CameraPool.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +2 -2
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +2 -2
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +2 -2
- package/build/js/private/FrameReaders/FrameReader.d.ts +2 -2
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +2 -2
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +2 -2
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +2 -2
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/NormalizedModuleLoaderOptions.d.ts +2 -2
- package/build/js/private/SingleImageUploaderView.d.ts +2 -2
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +2 -2
- package/build/js/private/ViewsRegistry.d.ts +2 -2
- package/build/js/private/customHowler/AudioCache.d.ts +37 -0
- package/build/js/private/customHowler/AudioCache.js +1 -0
- package/build/js/private/customHowler/Howl.d.ts +189 -0
- package/build/js/private/customHowler/Howl.js +1 -0
- package/build/js/private/customHowler/HowlRegistry.d.ts +18 -0
- package/build/js/private/customHowler/HowlRegistry.js +1 -0
- package/build/js/private/customHowler/Html5Sound.d.ts +52 -0
- package/build/js/private/customHowler/Html5Sound.js +1 -0
- package/build/js/private/customHowler/UnlockManager.d.ts +39 -0
- package/build/js/private/customHowler/UnlockManager.js +1 -0
- package/build/js/private/customHowler/WebAudioContextManager.d.ts +161 -0
- package/build/js/private/customHowler/WebAudioContextManager.js +1 -0
- package/build/js/private/customHowler/debug.d.ts +28 -0
- package/build/js/private/customHowler/debug.js +1 -0
- package/build/js/private/customHowler/index.d.ts +2 -0
- package/build/js/private/customHowler/index.js +1 -0
- package/build/js/private/customHowler/setup.d.ts +55 -0
- package/build/js/private/customHowler/setup.js +1 -0
- package/build/js/private/ui/atoms/Toast.d.ts +2 -2
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +2 -2
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.d.ts +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +2 -2
- package/build/js/worker/ImageConverterForwarder.d.ts +2 -2
- package/build/js/worker/ViewInfoHelper.d.ts +2 -2
- package/build/js/worker/WorkerMain.d.ts +2 -2
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/coreCapture.inlineWorker.d.ts +2 -2
- package/build/js/worker/coreCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +2 -2
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +2 -2
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +2 -2
- package/build/js/worker/index.d.ts +2 -2
- package/build/js/worker/index.js +1 -1
- package/package.json +1 -1
- package/build/js/chunks/chunk-7JVAQ2A3.js +0 -1
- package/build/js/chunks/chunk-BV63CXZF.js +0 -1
- package/build/js/chunks/chunk-E7IMQECS.js +0 -35
- package/build/js/chunks/chunk-IBDUCVB4.js +0 -1
- package/build/js/chunks/chunk-KUAZYGPM.js +0 -1
- package/build/js/chunks/chunk-WBYBTOBZ.js +0 -1
- package/build/js/chunks/chunk-XW3Z6KKS.js +0 -1
- package/build/js/chunks/chunk-YMM2PV73.js +0 -6
- package/build/js/private/customHowler.d.ts +0 -27
- package/build/js/private/customHowler.js +0 -1
- /package/build/js/chunks/{chunk-FHNMZZV2.js → chunk-YRQQE3NR.js} +0 -0
- /package/build/js/chunks/{chunk-DQ5X7FNV.js → chunk-ZCEA7BEH.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { C as Camera } from '../Camera-
|
|
2
|
+
import { C as Camera } from '../Camera-Cc__1Nc-.js';
|
|
3
3
|
import '../ScanditIcon.js';
|
|
4
4
|
import { INTERNAL_ACCESS } from './privateAccess.js';
|
|
5
|
-
import '../DataCaptureContext-
|
|
5
|
+
import '../DataCaptureContext-BcSpF9Dt.js';
|
|
6
6
|
import '../commons/Rect.js';
|
|
7
7
|
import './Serializable.js';
|
|
8
8
|
import '../commons/Point.js';
|
|
@@ -84,6 +84,7 @@ declare class CameraPool {
|
|
|
84
84
|
integrateIncomingVideoDevices(newCameras: Camera[]): void;
|
|
85
85
|
private allCamerasNoDeviceId;
|
|
86
86
|
get(): Camera[];
|
|
87
|
+
clear(): void;
|
|
87
88
|
private push;
|
|
88
89
|
private debugLog;
|
|
89
90
|
private logPool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as cameraPool,a as internal}from'../chunks/chunk-
|
|
1
|
+
export{b as cameraPool,a as internal}from'../chunks/chunk-QHBYNYWX.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { PrivateCanvasDrawer } from './CanvasDrawer.js';
|
|
3
|
-
import { I as PerformanceMetrics } from '../DataCaptureContext-
|
|
3
|
+
import { I as PerformanceMetrics } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
4
4
|
import '../ScanditIcon.js';
|
|
5
5
|
import './CavansDrawerAbstract.js';
|
|
6
6
|
import './DrawCommandBuffer.js';
|
|
7
|
-
import '../Camera-
|
|
7
|
+
import '../Camera-Cc__1Nc-.js';
|
|
8
8
|
import '../commons/Rect.js';
|
|
9
9
|
import './Serializable.js';
|
|
10
10
|
import '../commons/Point.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ModuleLicenseTextProvider } from './ModuleLicenseTextProvider.js';
|
|
3
|
-
import { f as DataCaptureContext } from '../DataCaptureContext-
|
|
3
|
+
import { f as DataCaptureContext } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
4
4
|
import { Logger } from '../logger.js';
|
|
5
|
-
import '../Camera-
|
|
5
|
+
import '../Camera-Cc__1Nc-.js';
|
|
6
6
|
import '../commons/Rect.js';
|
|
7
7
|
import './Serializable.js';
|
|
8
8
|
import '../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CoreModuleLicenseTextProvider}from'../chunks/chunk-
|
|
1
|
+
export{a as CoreModuleLicenseTextProvider}from'../chunks/chunk-HHA4HDG5.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { f as DataCaptureContext, F as FrameData } from '../DataCaptureContext-
|
|
3
|
-
import '../Camera-
|
|
2
|
+
import { f as DataCaptureContext, F as FrameData } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
3
|
+
import '../Camera-Cc__1Nc-.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import './Serializable.js';
|
|
6
6
|
import '../commons/Point.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-BcSpF9Dt.js';
|
|
3
3
|
import { FrameReaderAbstract } from './FrameReaderAbstract.js';
|
|
4
4
|
import { ColorType } from './ColorType.js';
|
|
5
|
-
import '../../Camera-
|
|
5
|
+
import '../../Camera-Cc__1Nc-.js';
|
|
6
6
|
import '../../commons/Rect.js';
|
|
7
7
|
import '../Serializable.js';
|
|
8
8
|
import '../../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as FrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{a as FrameReader}from'../../chunks/chunk-AKGGJKCA.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-BcSpF9Dt.js';
|
|
3
3
|
import { ColorType } from './ColorType.js';
|
|
4
4
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
5
5
|
import { Optional } from '../../tsHelper.js';
|
|
6
|
-
import '../../Camera-
|
|
6
|
+
import '../../Camera-Cc__1Nc-.js';
|
|
7
7
|
import '../../commons/Rect.js';
|
|
8
8
|
import '../Serializable.js';
|
|
9
9
|
import '../../commons/Point.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-BcSpF9Dt.js';
|
|
3
3
|
import { ColorType } from './ColorType.js';
|
|
4
4
|
import { FrameReaderAbstract, PoolCapacityOptions } from './FrameReaderAbstract.js';
|
|
5
5
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
6
6
|
import { Optional } from '../../tsHelper.js';
|
|
7
|
-
import '../../Camera-
|
|
7
|
+
import '../../Camera-Cc__1Nc-.js';
|
|
8
8
|
import '../../commons/Rect.js';
|
|
9
9
|
import '../Serializable.js';
|
|
10
10
|
import '../../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as GrayScaleFrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{b as GrayScaleFrameReader}from'../../chunks/chunk-AKGGJKCA.js';
|
|
@@ -3,8 +3,8 @@ export { ColorType as FrameReaderType } from './ColorType.js';
|
|
|
3
3
|
export { FrameReader } from './FrameReader.js';
|
|
4
4
|
export { FrameReaderAbstract } from './FrameReaderAbstract.js';
|
|
5
5
|
export { GrayScaleFrameReader } from './GrayScaleFrameReader.js';
|
|
6
|
-
import '../../DataCaptureContext-
|
|
7
|
-
import '../../Camera-
|
|
6
|
+
import '../../DataCaptureContext-BcSpF9Dt.js';
|
|
7
|
+
import '../../Camera-Cc__1Nc-.js';
|
|
8
8
|
import '../../commons/Rect.js';
|
|
9
9
|
import '../Serializable.js';
|
|
10
10
|
import '../../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as FrameReader,b as GrayScaleFrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{a as FrameReader,b as GrayScaleFrameReader}from'../../chunks/chunk-AKGGJKCA.js';export{a as FrameReaderType}from'../../chunks/chunk-ORP45GHJ.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { t as ModuleLoaderOptions } from '../DataCaptureContext-
|
|
2
|
+
import { t as ModuleLoaderOptions } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
3
3
|
import { LoadingStatusSubscriber } from '../LoadingStatus.js';
|
|
4
|
-
import '../Camera-
|
|
4
|
+
import '../Camera-Cc__1Nc-.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
6
6
|
import './Serializable.js';
|
|
7
7
|
import '../commons/Point.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { SingleImageUploaderSettings } from '../SingleImageUploaderSettings.js';
|
|
3
|
-
import { J as FrameId } from '../DataCaptureContext-
|
|
3
|
+
import { J as FrameId } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
4
4
|
import { View } from './View.js';
|
|
5
5
|
import 'csstype';
|
|
6
6
|
import './Serializable.js';
|
|
7
|
-
import '../Camera-
|
|
7
|
+
import '../Camera-Cc__1Nc-.js';
|
|
8
8
|
import '../commons/Rect.js';
|
|
9
9
|
import '../commons/Point.js';
|
|
10
10
|
import '../commons/Size.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SingleImageUploaderView}from'../chunks/chunk-
|
|
1
|
+
export{a as SingleImageUploaderView}from'../chunks/chunk-S2GRD6GO.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'../chunks/chunk-
|
|
1
|
+
import {a as a$1}from'../chunks/chunk-RY2EW3RR.js';import {d as d$1}from'../chunks/chunk-YUZDO2PC.js';import {b}from'../chunks/chunk-YONR3EGV.js';import {a}from'../chunks/chunk-XR65N6EG.js';import {f as f$1,g}from'../chunks/chunk-3D2HNEVH.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=false;this.controlTypeToAriaLabelMap={"camera-fov":"Switch camera field of view",camera:"Switch camera",torch:"Toggle torch"};this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=false){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=false,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),b.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed"));let t=this.control.type,i=this.controlTypeToAriaLabelMap[t];return e.setAttribute("aria-label",i),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=true,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=false,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},v=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():false}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class extends d{constructor(e,t){super(e,t);}async canShow(){return (await a$1.getAll()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var a;let e=await a$1.getAll(false,true),t=this.frameSource?this.frameSource:null,i=t==null?void 0:t.deviceId,r=e.findIndex(n=>n.deviceId===i);return r>-1?(a=e[r+1])!=null?a:e[0]:e.length>0?e[0]:null}async switchCameras(e){var a,n,l;this.isTransitioning=true;let t=(a=this.context)==null?void 0:a.frameSource,i,r;t!=null&&(i=new g(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off")),i!=null&&await e.applySettings(i),await((n=this.context)==null?void 0:n.setFrameSource(e)),await((l=this.context)==null?void 0:l.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}},C=class extends d{constructor(e,t){super(e,t);}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !b.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?false:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await a$1.getAll()).find(a=>d$1.isIOSBackCameraLabel(a.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):false}async getAlternativeCamera(){return (await a$1.getAll()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var a,n,l;this.isTransitioning=true;let t=(a=this.context)==null?void 0:a.frameSource,i,r;t!=null&&(i=new g(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off")),i!=null&&await e.applySettings(i),await((n=this.context)==null?void 0:n.setFrameSource(e)),await((l=this.context)==null?void 0:l.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{S as ButtonState,f as CameraSwitchControlWidget,C as PrivateCameraFOVSwitchControlWidget,v as PrivateTorchControlWidget};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { g as FrameSource } from '../Camera-
|
|
3
|
-
import { C as Control, f as DataCaptureContext, p as DataCaptureView } from '../DataCaptureContext-
|
|
2
|
+
import { g as FrameSource } from '../Camera-Cc__1Nc-.js';
|
|
3
|
+
import { C as Control, f as DataCaptureContext, p as DataCaptureView } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
4
4
|
import { CameraFOVSwitchControl } from '../controls/CameraFOVSwitchControl.js';
|
|
5
5
|
import { CameraSwitchControl } from '../controls/CameraSwitchControl.js';
|
|
6
6
|
import { TorchSwitchControl } from '../controls/TorchSwitchControl.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { p as DataCaptureView } from '../DataCaptureContext-
|
|
3
|
-
import '../Camera-
|
|
2
|
+
import { p as DataCaptureView } from '../DataCaptureContext-BcSpF9Dt.js';
|
|
3
|
+
import '../Camera-Cc__1Nc-.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import './Serializable.js';
|
|
6
6
|
import '../commons/Point.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Audio buffer cache manager
|
|
4
|
+
* Avoids re-loading and re-decoding the same audio files
|
|
5
|
+
*
|
|
6
|
+
* Benefits:
|
|
7
|
+
* - Multiple Howl instances for the same sound share one AudioBuffer
|
|
8
|
+
* - Avoids redundant network requests and CPU-intensive decoding
|
|
9
|
+
* - Particularly important for frequently played sounds (like beeps)
|
|
10
|
+
*
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
declare class AudioCache {
|
|
14
|
+
private cache;
|
|
15
|
+
/**
|
|
16
|
+
* Get a cached audio buffer promise
|
|
17
|
+
* @param src Audio source URL (data URI or file path)
|
|
18
|
+
* @returns Promise<AudioBuffer> if cached, undefined otherwise
|
|
19
|
+
*/
|
|
20
|
+
get(src: string): Promise<AudioBuffer> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Cache an audio buffer promise
|
|
23
|
+
* @param src Audio source URL
|
|
24
|
+
* @param promise Promise that resolves to decoded AudioBuffer
|
|
25
|
+
*/
|
|
26
|
+
set(src: string, promise: Promise<AudioBuffer>): void;
|
|
27
|
+
/**
|
|
28
|
+
* Clear all cached buffers (useful for cleanup or testing)
|
|
29
|
+
*/
|
|
30
|
+
clear(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get cache size (for monitoring)
|
|
33
|
+
*/
|
|
34
|
+
size(): number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { AudioCache };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as AudioCache}from'../../chunks/chunk-NYYGU4ZV.js';
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Type definitions for customHowler audio system
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
interface HowlOptions {
|
|
7
|
+
src: string | string[];
|
|
8
|
+
/**
|
|
9
|
+
* Force use of HTML5 audio element instead of Web Audio API.
|
|
10
|
+
* Useful for testing or specific use cases where HTML5 is preferred.
|
|
11
|
+
* Default: auto-detect (use Web Audio API everywhere for non-blocking playback)
|
|
12
|
+
* Note: HTML5 audio blocks the main thread and should be avoided.
|
|
13
|
+
*/
|
|
14
|
+
html5?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Lightweight Howl implementation using Web Audio API
|
|
18
|
+
*
|
|
19
|
+
* ## Features
|
|
20
|
+
*
|
|
21
|
+
* - **Web Audio API** (Desktop): Off-main-thread audio processing (smooth UI rendering)
|
|
22
|
+
* - **HTML5 Audio** (iOS): Reliable playback on iOS devices (avoids pitch shifting)
|
|
23
|
+
* - **HTML5 Sound pooling**: Maintains a pool of audio elements for efficient concurrent playback
|
|
24
|
+
* - **Caching**: Decoded AudioBuffers cached globally (efficient repeated playback)
|
|
25
|
+
* - **Overlapping playback**: Multiple source nodes allow simultaneous sounds
|
|
26
|
+
* - **Tree-shakable**: Side-effect free, lazy initialization
|
|
27
|
+
* - **Auto-unlock**: Automatically unlocks audio on first user interaction
|
|
28
|
+
* - **Auto-detect**: Automatically uses HTML5 on iOS, Web Audio API on desktop
|
|
29
|
+
*
|
|
30
|
+
* ## Usage
|
|
31
|
+
*
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const beep = new Howl({ src: 'beep.mp3' });
|
|
34
|
+
* beep.play(); // First call unlocks audio, subsequent calls play immediately
|
|
35
|
+
* beep.play(); // Overlapping playback supported
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* ## Performance Notes
|
|
39
|
+
*
|
|
40
|
+
* **Desktop (Web Audio API):**
|
|
41
|
+
* - Each play() call creates a new AudioBufferSourceNode (allows overlapping)
|
|
42
|
+
* - AudioBuffer is decoded once and shared (efficient repeated playback)
|
|
43
|
+
* - Audio runs on separate thread (doesn't block UI)
|
|
44
|
+
*
|
|
45
|
+
* **iOS (HTML5 Audio):**
|
|
46
|
+
* - Uses HTML5 audio pool for efficient concurrent playback
|
|
47
|
+
* - Main thread may block briefly during playback (unavoidable on iOS)
|
|
48
|
+
* - Reliable pitch and sample rate (avoids Web Audio API issues)
|
|
49
|
+
*
|
|
50
|
+
* ## Overlapping Playback
|
|
51
|
+
*
|
|
52
|
+
* Each call to play() creates a new AudioBufferSourceNode, allowing the same
|
|
53
|
+
* sound to play multiple times simultaneously (useful for rapid scanning feedback).
|
|
54
|
+
* The decoded AudioBuffer is shared, only the source nodes are created per play.
|
|
55
|
+
*/
|
|
56
|
+
declare class Howl {
|
|
57
|
+
/** Audio source URL (data URI, file path, or URL) */
|
|
58
|
+
private src;
|
|
59
|
+
/** Use HTML5 audio element (true) or Web Audio API (false) */
|
|
60
|
+
private html5;
|
|
61
|
+
/** Decoded audio buffer (cached after first load) - for Web Audio API only */
|
|
62
|
+
private audioBuffer;
|
|
63
|
+
/** Loading promise (prevents duplicate loads) */
|
|
64
|
+
private loadPromise;
|
|
65
|
+
/** Pool of HTML5 Sound objects (similar to Howler.js) */
|
|
66
|
+
private soundPool;
|
|
67
|
+
private soundPoolSize;
|
|
68
|
+
/** Track inactive (available) sounds for O(1) lookup instead of O(n) find */
|
|
69
|
+
private inactiveSounds;
|
|
70
|
+
constructor(options: HowlOptions);
|
|
71
|
+
/**
|
|
72
|
+
* Load and decode the audio file
|
|
73
|
+
*
|
|
74
|
+
* ## Caching Strategy
|
|
75
|
+
*
|
|
76
|
+
* This method implements three levels of caching:
|
|
77
|
+
*
|
|
78
|
+
* 1. **Instance cache**: Check if this Howl instance has already loaded the audio
|
|
79
|
+
* 2. **Instance promise cache**: Check if this Howl instance is currently loading
|
|
80
|
+
* 3. **Global cache**: Check if any Howl instance has loaded this URL
|
|
81
|
+
*
|
|
82
|
+
* Benefits:
|
|
83
|
+
* - Multiple Howl instances for the same sound share one AudioBuffer
|
|
84
|
+
* - Prevents duplicate network requests
|
|
85
|
+
* - Avoids redundant CPU-intensive audio decoding
|
|
86
|
+
* - Important for rapid scanning where same sound plays frequently
|
|
87
|
+
*
|
|
88
|
+
* ## Loading Process
|
|
89
|
+
*
|
|
90
|
+
* 1. Fetch audio file (supports data URIs, relative paths, full URLs)
|
|
91
|
+
* 2. Convert to ArrayBuffer
|
|
92
|
+
* 3. Decode using AudioContext.decodeAudioData() (async, CPU-intensive)
|
|
93
|
+
* 4. Cache the decoded AudioBuffer
|
|
94
|
+
*
|
|
95
|
+
* Note: decodeAudioData() runs in a separate thread and doesn't block the main thread
|
|
96
|
+
*
|
|
97
|
+
* @returns Promise<AudioBuffer> - Decoded audio ready for playback
|
|
98
|
+
*/
|
|
99
|
+
private load;
|
|
100
|
+
/**
|
|
101
|
+
* Get or create a sound from the pool
|
|
102
|
+
* Follows Howler.js pattern: pool of Sound objects with state tracking
|
|
103
|
+
* Uses Set for O(1) lookup of inactive sounds instead of O(n) array find
|
|
104
|
+
* @private
|
|
105
|
+
*/
|
|
106
|
+
private getSoundFromPool;
|
|
107
|
+
/**
|
|
108
|
+
* Verify audio buffer contains actual data (debugging helper, no-op in production)
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
111
|
+
private verifyAudioBuffer;
|
|
112
|
+
/**
|
|
113
|
+
* Handle playback errors for Web Audio API
|
|
114
|
+
* @private
|
|
115
|
+
*/
|
|
116
|
+
private handlePlaybackError;
|
|
117
|
+
/**
|
|
118
|
+
* Prepare AudioContext for playback
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
private prepareAudioContext;
|
|
122
|
+
/**
|
|
123
|
+
* Play sound using HTML5 Sound pool (Howler.js style)
|
|
124
|
+
* Follows Howler.js pattern of Sound objects with state tracking
|
|
125
|
+
*
|
|
126
|
+
* ## Non-blocking Playback
|
|
127
|
+
*
|
|
128
|
+
* On iOS, the HTML5 audio play() call can block the main thread. To prevent
|
|
129
|
+
* this from blocking overlay rendering during continuous scanning, we defer
|
|
130
|
+
* the play() call to the next animation frame using requestAnimationFrame.
|
|
131
|
+
* This keeps the current frame free for UI rendering.
|
|
132
|
+
*
|
|
133
|
+
* @private
|
|
134
|
+
*/
|
|
135
|
+
private playHTML5;
|
|
136
|
+
/**
|
|
137
|
+
* Play the sound.
|
|
138
|
+
*
|
|
139
|
+
* This method is the public API - call it to play the sound.
|
|
140
|
+
* It's non-blocking (fire-and-forget) and supports overlapping playback.
|
|
141
|
+
*
|
|
142
|
+
* ## Behavior
|
|
143
|
+
*
|
|
144
|
+
* - Creates a new AudioBufferSourceNode for each call (allows overlapping)
|
|
145
|
+
* - Reuses cached AudioBuffer (efficient repeated playback)
|
|
146
|
+
* - Auto-unlocks audio on first play (if not already unlocked)
|
|
147
|
+
* - Uses iOS MediaStreamDestination workaround when needed
|
|
148
|
+
*
|
|
149
|
+
* ## Example
|
|
150
|
+
*
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const beep = new Howl({ src: 'beep.mp3' });
|
|
153
|
+
* beep.play(); // First play
|
|
154
|
+
* beep.play(); // Overlapping play (both sounds play simultaneously)
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
play(): void;
|
|
158
|
+
/**
|
|
159
|
+
* Internal async play method
|
|
160
|
+
*
|
|
161
|
+
* ## Playback Flow
|
|
162
|
+
*
|
|
163
|
+
* 1. **Unlock check**: Ensure audio is unlocked (iOS requirement)
|
|
164
|
+
* 2. **Load**: Load and decode audio if not already cached
|
|
165
|
+
* 3. **Create source**: Create new AudioBufferSourceNode for this playback
|
|
166
|
+
* 4. **Setup audio graph**: Source → Gain → Destination
|
|
167
|
+
* 5. **Start playback**: Call source.start(0) to play immediately
|
|
168
|
+
* 6. **Cleanup**: Disconnect source after playback completes
|
|
169
|
+
*
|
|
170
|
+
* ## Platform-specific playback
|
|
171
|
+
*
|
|
172
|
+
* **Desktop:**
|
|
173
|
+
* - Uses Web Audio API with standard AudioContext destination
|
|
174
|
+
*
|
|
175
|
+
* **iOS:**
|
|
176
|
+
* - Uses HTML5 <audio> elements for reliable playback
|
|
177
|
+
* - Avoids Web Audio API pitch shifting issues on real devices
|
|
178
|
+
*
|
|
179
|
+
* ## Performance Notes
|
|
180
|
+
*
|
|
181
|
+
* - AudioBuffer loading/decoding happens once (cached)
|
|
182
|
+
* - Each play() creates only a lightweight source node
|
|
183
|
+
* - Gain node allows future volume control (currently 1.0)
|
|
184
|
+
* - Source disconnects automatically after playback to free memory
|
|
185
|
+
*/
|
|
186
|
+
private playAsync;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export { Howl, type HowlOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Howl}from'../../chunks/chunk-EEWGHHL4.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Register a Howl instance in the global registry
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
declare function registerHowlInstance(howl: any): void;
|
|
7
|
+
/**
|
|
8
|
+
* Unregister a Howl instance from the global registry
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
11
|
+
declare function unregisterHowlInstance(howl: any): void;
|
|
12
|
+
/**
|
|
13
|
+
* Get all active Howl instances (for internal cleanup)
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
declare function getActiveHowlInstances(): any[];
|
|
17
|
+
|
|
18
|
+
export { getActiveHowlInstances, registerHowlInstance, unregisterHowlInstance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{c as getActiveHowlInstances,a as registerHowlInstance,b as unregisterHowlInstance}from'../../chunks/chunk-ZAXZRQYF.js';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper for HTML5 audio element with state tracking (similar to Howler.js Sound)
|
|
4
|
+
* Tracks paused, ended, and seek position independently from element state
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
declare class Html5Sound {
|
|
8
|
+
node: HTMLAudioElement;
|
|
9
|
+
_paused: boolean;
|
|
10
|
+
_ended: boolean;
|
|
11
|
+
_seek: number;
|
|
12
|
+
private onEndedHandler;
|
|
13
|
+
private onPauseHandler;
|
|
14
|
+
private onPlayHandler;
|
|
15
|
+
private onInactive?;
|
|
16
|
+
constructor(src: string, onInactive?: (sound: Html5Sound) => void);
|
|
17
|
+
/**
|
|
18
|
+
* Handle natural playback completion
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
private onEnded;
|
|
22
|
+
/**
|
|
23
|
+
* Track pause events
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private onPause;
|
|
27
|
+
/**
|
|
28
|
+
* Track play events
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private onPlay;
|
|
32
|
+
/**
|
|
33
|
+
* Start playback from the beginning, deferred to the next animation frame.
|
|
34
|
+
* Deferring avoids blocking the main thread (critical for smooth overlay
|
|
35
|
+
* rendering during continuous scanning on iOS).
|
|
36
|
+
*/
|
|
37
|
+
play(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Pause playback and preserve current position
|
|
40
|
+
*/
|
|
41
|
+
pause(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Stop playback and reset to beginning
|
|
44
|
+
*/
|
|
45
|
+
stop(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Clean up event listeners (for disposal)
|
|
48
|
+
*/
|
|
49
|
+
dispose(): void;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { Html5Sound };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as Html5Sound}from'../../chunks/chunk-AAPD5YU3.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="emscripten" />
|
|
2
|
+
/**
|
|
3
|
+
* Manages audio unlock state and event listeners
|
|
4
|
+
* Handles setup of user interaction listeners for iOS audio unlock
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
declare class UnlockManager {
|
|
8
|
+
private setupComplete;
|
|
9
|
+
private handler;
|
|
10
|
+
private readonly events;
|
|
11
|
+
private readonly doc;
|
|
12
|
+
/**
|
|
13
|
+
* Constructor - accepts optional document for dependency injection
|
|
14
|
+
* @param doc - Document object (defaults to global document for browser, undefined for tests)
|
|
15
|
+
*/
|
|
16
|
+
constructor(doc?: Document);
|
|
17
|
+
/**
|
|
18
|
+
* Check if unlock setup is complete
|
|
19
|
+
*/
|
|
20
|
+
isSetupComplete(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Mark setup as complete
|
|
23
|
+
*/
|
|
24
|
+
markSetupComplete(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Setup unlock handlers and add event listeners
|
|
27
|
+
*/
|
|
28
|
+
setup(handler: EventListener): void;
|
|
29
|
+
/**
|
|
30
|
+
* Reset unlock state (called during disposal/reset)
|
|
31
|
+
*/
|
|
32
|
+
reset(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Remove all event listeners
|
|
35
|
+
*/
|
|
36
|
+
private removeListeners;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { UnlockManager };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as UnlockManager}from'../../chunks/chunk-LV6LGCDC.js';
|