UNPKG

@scandit/web-datacapture-barcode

Version:

Scandit Data Capture SDK for the Web

1 lines 971 B
var r=(e=>(e.User="user",e.Timeout="timeout",e))(r||{}),o=class a{constructor(t){this.context=t;}static forContext(t){return new a(t)}startSession(t){this.setTorchState(t.torchState),this.setScanningMode(t.scanningMode),this.setSoundEnabled(t.soundEnabled),this.setHapticEnabled(t.hapticEnabled),this.setCameraPosition(t.cameraPosition);}setTorchState(t){this.setProperty({key:"torch_state",value:t});}setScanningMode(t){var e;this.setProperty({key:"scanning_mode",value:(e=t==null?void 0:t.toAnalyticsJSONObject())!=null?e:null});}setSoundEnabled(t){this.setProperty({key:"sound_enabled",value:t!=null?t:null});}setHapticEnabled(t){this.setProperty({key:"haptic_enabled",value:t!=null?t:null});}setSessionStopReason(t){this.setProperty({key:"session_stop_reason",value:t});}setCameraPosition(t){this.setProperty({key:"camera_position",value:t});}setProperty(t){this.context.workerCommand("sparkScanAnalyticsManagerPropertyChanged",{property:t});}};export{r as a,o as b};