Thanks for downloading Dynamsoft Barcode Reader Package!
Your download will start shortly. If your download does not begin, click here to retry.
BarcodeScanner
Camera Control MethodsMethod | Description |
---|---|
getAllCameras |
Get information of all available cameras on the device. |
getCurrentCamera |
Get information about the currently used camera. |
setCurrentCamera |
Set camera by its information or device ID. |
hide |
Stop the camera and hide the camera UI element. |
show |
Show the camera UI element, open the camera, and start decoding. |
close |
Close and release the camera. |
isOpen |
Check if the camera is open. |
open |
Open the camera. |
pause |
Pause the video stream. |
play |
Continue the video stream. |
stop |
Stop the video and release the camera. |
pauseScan |
Pause the video decoding process. |
resumeScan |
Resume the video decoding process. |
Get information of all available cameras on the device.
getAllCameras() returns Promise
Promise<VideoDeviceInfo[]>
let cameras = await scanner.getAllCameras();
if(cameras.length){
await scanner.setCurrentCamera(cameras[0]);
}
Get information about the currently used camera.
getCurrentCamera() returns Promise
Promise<VideoDeviceInfo[] | null>
Set camera by its information or device ID.
setCurrentCamera(cameraInfoOrDeviceId) returns Promise
cameraInfoOrDeviceId
any
Promise<ScannerPlayCallbackInfo>
Read barcodes from live camera
Stop decoding, close and release the camera, unbind from UI, and set the UI element with display:none;
hide() returns void
void
Read barcodes from live camera
Bind UI, open the camera, remove the UIElement display
style if the original style is display:none;
, and start decoding.
show() returns Promise
Promise<ScannerPlayCallbackInfo>
Read barcodes from live camera
Stop decoding, close and release the camera, and unbind from UI.
close() returns void
void
Read barcodes from live camera
Check if the scanner is open.
isOpen() returns Boolean
Boolean
Read barcodes from live camera
Bind UI, open the camera, and start decoding.
open() returns Promise
Promise<ScannerPlayCallbackInfo>
Read barcodes from live camera
Pause the video stream but will not release the camera.
pause() returns void
void
Read barcodes from live camera
Continue the video stream.
play(deviceId, width, height) returns Promise
deviceId
stringwidth
numberheight
numberPromise<ScannerPlayCallbackInfo>
Read barcodes from live camera
Stop the video, and release the camera.
stop() returns void
void
Read barcodes from live camera
Pause the video decoding process.
pauseScan() returns void
void
Read barcodes from live camera
Resume the video decoding process.
resumeScan() returns void
void
version 7.6.0