How to Upgrade DBR-JS from v8.x to v9.x
-
Update the version number if you are using a CDN:
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.3.33/dist/dbr.js"></script>If you have deployed the library files to your own server, download the latest version and replace the old files.
-
Update the API you use for licensing the SDK
Previously, you might have used the APIs productKeys, handshakeCode, organizationID and sessionPassword, etc. In v9.0.0+, use the API license instead.
- If you used an offline license before, simply pass that license key using the API
license. - If you used an online license before, you can log in the customer portal and check the according license key to be used with the API
license.
Contact Dynamsoft Sales Team for more information.
Breaking changes introduced in v9.0.0
- The following APIs are renamed:
| Old API | New API |
|---|---|
onUnduplicatedRead |
onUniqueRead |
outputSettingsToString() |
outputRuntimeSettingsToString() |
Dynamsoft.DBR.BarcodeReader.isLoaded() |
Dynamsoft.DBR.BarcodeReader.isWasmLoaded() |
- The following APIs are removed:
| API Name | Notes |
|---|---|
Dynamsoft.DBR.browserInfo |
Use Dynamsoft.DBR.BarcodeReader.browserInfo instead. |
Dynamsoft.DBR.detectEnvironment() |
Use Dynamsoft.DBR.BarcodeReader.detectEnvironment() instead. |
Dynamsoft.DBR.deviceFriendlyName |
Use Dynamsoft.DBR.BarcodeReader.deviceFriendlyName instead. |
Dynamsoft.DBR.engineResourcePath |
Use Dynamsoft.DBR.BarcodeReader.engineResourcePath instead. |
Dynamsoft.DBR.handshakeCode |
Use Dynamsoft.DBR.BarcodeReader.license instead. |
Dynamsoft.DBR.isLoaded() |
Use Dynamsoft.DBR.BarcodeReader.isWasmLoaded() instead. |
Dynamsoft.DBR.licenseServer |
Use Dynamsoft.DBR.BarcodeReader.license instead. |
Dynamsoft.DBR.loadWasm() |
Use Dynamsoft.DBR.BarcodeReader.loadWasm() instead. |
Dynamsoft.DBR.organizationID |
Use Dynamsoft.DBR.BarcodeReader.license instead. |
Dynamsoft.DBR.productKeys |
Use Dynamsoft.DBR.BarcodeReader.license instead. |
Dynamsoft.DBR.sessionPassword |
Use Dynamsoft.DBR.BarcodeReader.license instead. |
Dynamsoft.DBR.version |
Use Dynamsoft.DBR.BarcodeReader.version instead. |
- The following APIs are moved:
| API Name | Notes |
|---|---|
whenToPlaySoundforSuccessfulRead |
Moved to ScanSettings. |
soundOnSuccessfullRead |
Moved to ScanSettings. |
whenToVibrateforSuccessfulRead |
Moved to ScanSettings. |
vibrateDuration |
Moved to ScanSettings. |
- The file dbr.scanner.html has been renamed to dbr.ui.html.
Breaking changes introduced in v8.8.0
The class names of the built-in UI elements changed in v8.8.0+:
| Previous versions | v8.8.0+ |
|---|---|
dbrScanner-bg-loading |
dce-bg-loading |
dbrScanner-bg-camera |
dce-bg-camera |
dbrScanner-video |
dce-video |
dbrScanner-sel-camera |
dce-sel-camera |
dbrScanner-sel-resolutio |
dce-sel-resolution |
dbrScanner-btn-close |
dce-btn-close |