Release Notes - JavaScript 3.x
3.3.10 (02/05/2024)
Added
- Added type
DrawingLayer
.
Fixed
- Fixed the problem of not being able to open the camera in the WebView of HarmonyOS.
- Fixed an issue on iOS 17 where reopening the camera after leaving the browser might fail.
3.3.9 (12/06/2023)
Added
- Added
cameraOpenTimeout
to control the maximum time allowed for opening a selected camera.
Improved
- Updated the resolution selection drop-down box to make it more intuitive.
- Updated setZoom() to support Safari on iOS 17.x.
Fixed
- Fixed an issue with unstable video streaming upon opening the camera on iOS 17.x.
- Fixed an issue when
refreshInterval
is greater than 0, the buffer is refreshed during eachloopInterval
, instead of whenrefreshInterval
is reached.
3.3.8 (10/12/2023)
Fixed
- Fixed an issue that may cause an error when using WebGL to fetch images on iOS 16.7 and iOS 17.
3.3.7 (10/11/2023)
Fixed
- Fixed an issue where incorrect data was retrieved when fetching grayscale images or fetching images by ‘context2d’.
3.3.6 (09/13/2023)
Changed
- Updated the API
singleFrameMode
to allow direct camera access on mobile devices.
Fixed
- Fixed an issue that may cause an extraneous input element to appear on Safari in iOS 16.
3.3.5 (08/02/2023)
Fixed
- Fixed an issue where TypeScript 5 cannot locate the declaration file when importing package.
New
- Added API
isPaused()
to check if the video stream is paused.
Improved
- Refined the default camera selection logic on iOS, enhancing the scanner’s functionality. When Safari supports it, the scanner will now default to auto-switch-triple-camera, ensuring improved support for Ultra Wide, Wide, and Telephoto scenarios.
- Modified
convertToPageCoordinates()
andconvertToClientCoordinates()
to return decimal results directly instead of rounded results.
3.3.4 (04/17/2023)
Fixed
- Fixed a bug that the
ScanRegionMask
andScanRegionLaser
might disappear when the camera is re-opened. - Fixed a bug that the
Resolution
might be changed when the methodgetResolutions()
is triggered.
3.3.3 (04/11/2023)
Fixed
- Fixed a bug that led to a wrong camera being selected as the default camera when used on a device running iOS 16.4.
- Fixed a bug that caused the scan region mask or the decorator to randomly appear and disappear when swiping the screen in Safari on iOS.
3.3.2 (04/04/2023)
New
- Added method
convertToPageCoordinates()
to convert the coordinates on image frames to coordinates on the HTML page. - Added method
convertToClientCoordinates()
to convert the coordinates on image frames to coordinates within the application’s viewport (usually it means the browser window).
Improved
- When
open()
is called, if there is no camera or the access is denied, an error is thrown right away (previously the error is thrown after a while).
3.3.1 (02/20/2023)
Fixed
- Fixed a bug where tapping to focus the camera could go beyond the camera’s supported range.
3.3.0 (02/09/2023)
Changed
- The DrawingLayer is placed over the scan region mask.
Fixed
- Fixed a bug where resuming a video is not “resuming” but “replaying”.
- Fixed a bug where tip continues to show up after
hideTip()
is called. - Fixed a bug in Safari where video may stop playing when the web page’s
visibilityState
changes to “visible” from “hidden”.
3.2.0 (12/13/2022)
New
- Introduced the Tip feature with the new methods
showTip()
,hideTip()
,updateTipMessage()
and an eventonTipSuggested
. - Added method
deleteDrawingLayer()
to delete an existing DrawingLayer. - Added method
clearFrameBuffer()
to remove all buffered image frames. - Added methods
getZoomSettings()
,resetZoom()
,getFocusSettings()
,enableTapToFocus()
,disableTapToFocus()
andisTapToFocusEnabled()
for better camera control. - Added method
testCameraAccess()
to help test the availability of cameras.
Changed
- The method
setZoom()
now accepts an object as zoom settings. - The method
setFocus()
now accepts an object as focus settings.
3.1.0 (10/20/2022)
New
- Added methods
getZoom()
,getColorTemperature()
,getExposureCompensation()
for better camera control. - Added the “Note” feature to DrawingItems to allow extra information to be added to them for timely interation. Related methods include
addNote()
,getNote()
,hasNote()
,updateNote()
,deleteNote()
,getNotes()
, andclearNotes()
. - Added methods
setAttribute()
andgetAttribute()
to DrawingItems to allow the change and retrieval of their properties. - Added methods
on()
andoff()
to DrawingItems to allow binding and unbinding of event listeners to the events mousedown, mouseup, dblclick, mouseover, mouseout (the last three don’t work on mobile devices).
Changed
- The method
setZoom()
now uses both the camera and WebGL, so it works on all browsers and devices. - The method
getDrawingItems()
now accepts a filter function to allow the returning of only a selected few of all DrawingItems on the DrawingLayer. - The property
isDisposed
has been deprecated in favor ofdisposed
. - The property
frameColorMode
has been deprecated in favor offramePixelFormat
. - The field name
colorMode
has been deprecated in favor ofpixelFormat
in the interfaceDCEFrame
. - The DrawingItem Type
DT_Text
now has a fixed width and the text within is wrapped. - The DrawingItem Type
DT_Text
now allows line breaks (\n
) and tabs (\t
) in the content of the text. - When playing a static video, the camera selection and resolution selection boxes are hidden.
3.0.1 (08/04/2022)
- Fixed a bug where the scan region mask and/or other shapes drawn on the UI were not updated when the view changed to landscape from portrait or vice versa on mobile devices.
3.0.0 (07/27/2022)
Changelog
New
- Added callback
onWarning
which is triggered when the running environment is not ideal. - Added property
isDisposed
to indicate whether the CameraEnhancer instance has been disposed. - Added method
offAll()
to remove all event handlers from the specified event. If no event is specified, remove all event handlers. - Added method
removeScanRegionOverlayCanvas()
to remove the specified Canvas element which was added with addScanRegionOverlayCanvas().
The following APIs are for the new feature of drawing shapes. Read more on Draw Shapes with DCE JS.
- Added type
DrawingItem
to define basic shapes to be drawn. - Added class
DT_Rect
,DT_Arc
,DT_Text
,DT_Line
,DT_Polygon
,DT_Image
, andDT_Group
to define different shapes of DrawingItem. -
Added interface
Point
to describe the vertices when constructing objects ofDT_Line
andDT_Polygon
. - Added interface
DrawingLayer
to organize items. - Added method
createDrawingLayer()
to create a DrawingLayer object. - Added method
getDrawingLayer()
to get the DrawingLayer specified by its ID. -
Added method
clearDrawingLayers()
to remove all DrawingLayer objects. - Added interface
DrawingStyle
to customize styles for drawing DrawingItems. - Added method
createDrawingStyle()
to create a DrawingStyle object and return its ID. - Added method
getDrawingStyle()
to get the DrawingStyle specified by its ID. - Added method
getDrawingStyles()
to get all DrawingStyle objects. -
Added method
updateDrawingStyle()
to update a DrawingStyle specified by its ID. - Added method
setOriginalImage()
to set an original image to be drawn on a built-in canvas above which shapes are drawn usually based on coordinates of certain objects found on this image by other SDKs such as barcode locations found by DBR. - Added method
getOriginalImage()
to return the original image. - Added method
showOriginalImage()
to show the built-in canvas on which the original image is drawn. - Added method
hideOriginalImage()
to hide the built-in canvas on which the original image is drawn. - Added method
deleteOriginalImage()
to delete the original image and remove the built-in canvas that shows it. - Added method
getSelectedDrawingItems()
to get the selected DrawingItems which will be helpful in further processing of the original image by another SDK. For example, the DrawingItem may refer to the boundaries of the region of interest that the user wishes to crop from the image.
On the DrawingLayer interface:
- Added method
addDrawingItems()
to add one or multiple DrawingItems. - Added method
getDrawingItems()
to return all DrawingItems. - Added method
removeDrawingItems()
to remove one or multiple DrawingItems. - Added method
setDrawingItems()
to set new DrawingItems which means old DrawingItems will be removed. - Added method
hasDrawingItem()
to determine whether a DrawingItem exists on this DrawingLayer. - Added method
clearDrawingItems()
to remove all DrawingItems from this DrawingLayer. - Added method
setMode()
to switch the DrawingLayer between editor and viewer mode. - Added method
getMode()
to get the current mode the DrawingLayer is in. - Added method
getId()
to return the ID of the DrawingLayer. - Added method
setDrawingStyle()
to use different DrawingStyles on the DrawingLayer. - Added method
setVisible()
to show or hide the DrawingLayer. - Added method
isVisible()
to return whether the DrawingLayer is visible. - Added method
renderAll()
to redraw all DrawingItems. - Added event
onSelectionChange()
to listen on the selection or deselection of DrawingItems on the DrawingLayer.