Barcode AR

Defined under the namespace Scandit.Datacapture.Barcode.Ar

BarcodeAr
class BarcodeAr : DataCaptureMode

Added in version 7.1.0

Capture mode that implements Barcode AR.

forContext(context, settings)
static forContext(context: DataCaptureContext,
        settings: BarcodeArSettings): Promise<BarcodeAr>

Added in version 7.1.0

Constructs a new BarcodeAr instance with the provided settings.

feedback
feedback: BarcodeArFeedback

Added in version 7.1.0

Instance of BarcodeArFeedback that is used by the barcode scanner to notify users about Ar events.

The default instance of the Feedback will have both sound and vibration enabled. A default beep sound will be used for the sound.

Note

Please note that on some browsers the autoplay of media elements is not guaranteed and may need a user interaction first. More info here (chrome) and here (webkit)

context
get context(): DataCaptureContext | null

Added in version 7.1.0

Implemented from DataCaptureMode. See DataCaptureMode.context.

createRecommendedCameraSettings()
static createRecommendedCameraSettings(): CameraSettings

Added in version 7.1.0

Returns the recommended camera settings for use with Barcode AR.

applySettings(settings)
applySettings(settings: BarcodeArSettings): Promise<void>

Added in version 7.1.0

Asynchronously applies the new settings to the barcode scanner. If the scanner is currently running, the task will complete when the next frame is processed, and will use the new settings for that frame. If the scanner is currently not running, the task will complete as soon as the settings have been stored and won’t wait until the next frame is going to be processed.

addListener(listener)
addListener(listener: BarcodeArListener): void

Added in version 7.1.0

Adds a listener to receive Barcode AR events.

In case the same listener is already observing this instance, calling this method will not add the listener again.

removeListener(listener)
removeListener(listener: BarcodeArListener): void

Added in version 7.1.0

Removes a previously added listener from this BarcodeAr instance.

In case the listener is not currently observing this instance, calling this method has no effect.

setBarcodeFilter(filter)
setBarcodeFilter(filter: BarcodeArFilter | null): Promise<void>

Added in version 8.7.0

Sets a filter that determines which barcodes should be visible in the BarcodeArSession.

Pass null to remove the filter and show all barcodes.

See BarcodeArFilter for details on implementing a custom filter.

The filter is transferred to the SDK worker as source code, so it must be a pure function and this method rejects when it cannot be rebuilt there. See BarcodeArFilter for what that rules out.

setEnabled(enabled)
setEnabled(enabled: boolean): Promise<void>

Added in version 7.1.0

isEnabled()
isEnabled(): boolean

Added in version 7.1.0