@scandit/web-datacapture-barcode
Version:
Scandit Data Capture SDK for the Web
1 lines • 1.06 kB
JavaScript
var r=(t=>(t.User="user",t.Timeout="timeout",t))(r||{}),a=class o{constructor(e){this.context=e;}static forContext(e){return new o(e)}startSession(e){this.setTorchState(e.torchState),this.setScanningMode(e.scanningMode),this.setSoundEnabled(e.soundEnabled),this.setHapticEnabled(e.hapticEnabled),this.setHandMode(e.handMode),this.setCameraPosition(e.cameraPosition);}setTorchState(e){this.setProperty({key:"torch_state",value:e});}setScanningMode(e){var t;this.setProperty({key:"scanning_mode",value:(t=e==null?void 0:e.toAnalyticsJSONObject())!=null?t:null});}setSoundEnabled(e){this.setProperty({key:"sound_enabled",value:e!=null?e:null});}setHapticEnabled(e){this.setProperty({key:"haptic_enabled",value:e!=null?e:null});}setHandMode(e){this.setProperty({key:"hand_mode",value:e});}setSessionStopReason(e){this.setProperty({key:"session_stop_reason",value:e});}setCameraPosition(e){this.setProperty({key:"camera_position",value:e});}setProperty(e){this.context.workerCommand("sparkScanAnalyticsManagerPropertyChanged",{property:e});}};export{r as a,a as b};