UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines 667 B
import {Vibration,Feedback,Sound}from'@scandit/web-datacapture-core';import {throttle}from'@scandit/web-datacapture-core/build/js/private/utils/throttle.js';var r=Vibration.withPattern([300]),l=500,c=class a{constructor(t,e,n){this.scanned=new Feedback(e?r:null,t?n:null),this.tapped=new Feedback(e?r:null,null),this.scanned.emit=throttle(this.scanned.emit.bind(this.scanned),l);}static async createWithOptions(t,e){let{scanSound:n}=await import('../ar/assets/checkSound.js');return new a(t,e,new Sound(n))}static async createDefaultBarcodeArFeedback(){let{scanSound:t}=await import('../ar/assets/checkSound.js');return new a(true,true,new Sound(t))}};export{c as a};