# Changelog ## [1.4.6] - 2024-04-04 ### Added - Flashlight capability is now available on iOS, as newer versions of Safari apparently support it. ### Fixed - Improved camera reliability on iOS, Safari 17.4 spuriously loses the camera stream, and we were unable to recover from this event in all situations. - Fixed symbologies sometimes being enabled even though they were not configured due to uninitialized memory. ## [1.4.5] - 2024-03-26 ### Fixed - Fixed the `BarcodeReader` host element growing in vertical size in certain layout situations. A ResizeObserver was registered on the host element and caused an endless loop. The element hosting the camera stream will now no longer adapt automatically to size changes of the host element. ### Changed - If an error occurs in the constructor of `BarcodeReader`, the thrown error will now include the `detailMessage` in its `message` property, making it easier to identify problems during integration. Previously `message` contained only an opaque error message (*The supplied configuration is not valid*) which was not helpful in debugging issues such as the host element not using relative positioning. ## [1.4.4] - 2024-03-04 ### Added - Added a non-modular build flavor `strich-noesm.js` that uses an IIFE and exposes the SDK through a global `strich` object. This flavor is only recommended for scenarios where ES6 modules (import/export) are not supported. ### Changed - Switched our underlying build infrastructure to use esbuild instead of Parcel. If you experience issues in your build environment when upgrading to this release, please let us know. ### Fixed - Handle camera track muting: when the browser decides to mute the camera video track, display an error and offer to re-acquire the camera. This addresses in an issue in iOS 17.4 Beta versions where client-side navigation in SPAs triggers causes Safari to mute the track (https://bugs.webkit.org/show_bug.cgi?id=269846) and allows to recover from this state manually. - Calling `BarcodeReader.start()` on an already started `BarcodeReader` instance no longer causes performance warnings in the browser console on Chrome, and is now simply ignored. - Absolute image URLs are now supported for overlay logo customization (Enterprise-only). The hosting server must be configured to support cross-origin resource sharing (CORS). ## [1.4.3] - 2024-02-12 ### Changed - The default camera on iPhones with multiple back-facing cameras (e.g. iPhone 15 Pro) is now the *Back Dual Wide Camera*. Previously, the *Back Camera* was selected, which resulted in bad scanning performance due to the camera being out of focus. ## [1.4.2] - 2024-02-05 ### Added - Allow overriding camera selection by providing a `constraints` object in the frame source configuration. This is an advanced option that should be used with care. ### Fixed - Significantly improved Data Matrix read rates where codes suffer from perspective warp (not viewed from above). - GS1 QR codes with FNC1 in first position now no longer results in empty data. ## [1.4.1] - 2024-01-26 ### Fixed - Improved Aztec Code detection rate for compact codes and improved accuracy of detection quadrilateral. ### Changed - Removed all `console.error()` invocations to avoid issues with automated testing systems checking for console error messages. Non-critical errors are reported via `console.warn()`, critical errors are propagated via `SdkError` and the displayed on the overlay. ## [1.4.0] - 2023-12-29 ### Fixed - Fixed a performance issue that manifested itself on less powerful devices where the majority of processing time was spent on GPU->CPU buffer transfers, leading to up to 60% performance increase in some situations. ### Changed - `BarcodeReader.destroy()` now returns a Promise that resolves when the `BarcodeReader` and its resources are destroyed. The returned Promise is typically already resolved, unless `destroy()` is called while the BarcodeReader is being initialized, in which case the destruction happens after initialization completes. Previously, calling `destroy()` while `initialize()` was still pending caused a crash. Existing application code that calls `destroy()` does not need to be adapted. ### Added - Added basic overlay styling capabilities to overlay. The color of the viewfinder, camera selector control and flashlight icons can now be set via overlay configuration property `primaryColor`. The color of highlighted barcode detections can be set using `highlightColor`, and the `cornerRadius` property can be used to apply rounded corners to the viewfinder and camera selector control. The color of the targeting line when a linear barcode is detected can be set using `targetingLineActiveColor`. The defaults for all these properties match the previous hard-coded values, so if you are happy with the look & feel, you don't have to do anything. - Added overlay configuration property `filterCameras` to control filtering of camera devices shown in camera selector. If set to true `true` (default), only back-facing camera devices are listed. If set to `false`, all camera devices available in the browser are listed. - If a `BarcodeReader` could not be initialized due to missing browser capabilities like WebAssembly, WebGL or getUserMedia, mention the missing capability in the `detailMessage` property of the thrown `SdkError`. - Report the detected code's location as a quadrilateral instead of an axis-aligned bounding box in the new `quadrilateral` property of the `CodeDetection`. The overlay will also use this more precise location for drawing the detections if `drawDetections` is enabled. ## [1.3.4] - 2023-11-28 ### Fixed - Significantly improved Aztec Code recognition rates for full-range codes. - Removed transmission of unnecessary URL parts in license verification and usage tracking. ## [1.3.3] - 2023-11-07 ### Fixed - Fixed an issue on iOS where camera access failed with a _camera device is not compatible_ error message `rememberCameraDeviceId` was set to `true` and the user's device changed, leading to the remembered camera device id no longer being valid. ### Changed - Expose detail message when license check fails, providing potentially useful information on how to resolve the issue (e.g. URL not in scope) ### Added - Throw a dedicated error if the SDK is initialized in an insecure context (non-HTTPS, non-localhost). Previously this was reported in a confusing fashion (invalid license). ## [1.3.2] - 2023-10-26 ### Fixed - Fixed an issue that led to offline-capable license keys being reported as expired. ## [1.3.1] - 2023-10-14 ### Added - Added configuration option `focusOnTap` (default: `true`) to overlay configuration: this toggles the autofocus that occurs when tapping on the overlay. Previously focusing on tap was always enabled. ### Changed - Adapted license service calls in order to re-enable detailed usage stats in Customer Portal using Client Hints. No changes to existing Content Security Policies are necessary. ## [1.3.0] - 2023-09-20 ### Added - New configuration option `rememberCameraDeviceId` in frame source configuration: if set to `true`, the SDK will remember the selected camera device after a successful scan, and attempt to re-acquire it when re-initialized. Default value is `false`. - Support for PDF417 and Compact PDF417 symbologies is now available, the new symbology can be activated by specifying `pdf417` in the `symbologies` array of the engine configuration. PDF417 barcodes can only be read in horizontal direction at the moment. ### Changed - Under the hood improvements and removal of legacy code. ## [1.2.2] - 2023-08-16 ### Added - Extended support for inverted codes to 1D barcodes. Setting `invertedCodes` to `true` will now also cause inverted 1D barcodes to be read. - New helper method `StrichSDK.hasCameraDevice()` to check for the existence and availability of a camera device. ## [1.2.1] - 2023-07-28 ### Added - Raw code data is now exposed through the `rawData` property of the `CodeDetection`. ## [1.2.0] - 2023-07-12 ### Added - The GPU-accelerated barcode locator is now based on WebGL 2, which is widely supported by now. If you are for some reason required to use WebGL 1, set the new `impl` field on the locator configuration to `webgl1`. WebGL 2 supports asynchronous reads which we use to decrease the load on the main thread. Some older Safari versions have reported issues using the asynchronous reads, which is why for the moment we have disabled asynchronous reads on iOS. This will likely change in the future. ### Fixed - Fixed a rare engine crash that resulted from incorrect error handling. ### Changed - Changed the default values for `hysteresisMinCount` to `2` and `hysteresisInterval` to `350`. The previous defaults were causing EAN/UPC codes to be unreadable on low-end Android devices. ## [1.1.4] - 2023-06-26 ### Added - User-facing error messages (e.g. "Access to camera not permitted") are now localized. English, Spanish, German, French and Italian are the currently supported languages, with more to come. - Prepared support for iOS 17 Safari OffscreenCanvas+WebGL support. STRICH will utilize a GPU-accelerated OffscreenCanvas if the browser supports it. ### Fixed - Improved performance when scanning EAN/UPC codes with hysteresis enabled. ## [1.1.3] - 2023-06-07 ### Added - Configurable min/max length for variable-length symbologies. Instead of just the name, specify an object with `name`, `minLen` and/or `maxLen` in the `symbologies` array. Example: `symbologies: ['ean13', { name: 'code128', minLen: 8, maxLen: 12 }]` ### Fixed - Removed a stray console output statement that was meant for debugging purposes only. ## [1.1.2] - 2023-06-06 ### Fixed - Improved error handling when encountering `OverconstrainedError`, especially on Firefox desktop. Special thanks to Jukka Aittokallio for reporting the issue. ## [1.1.1] - 2023-05-22 ### Added - Added hysteresis for 1D barcodes with weak checksums (EAN/UPC symbologies) to decrease misreads. This feature improves reliability for EAN/UPC barcodes at the cost of slightly slower detection, and can be deactivated by setting the new `hysteresisMinCount` engine parameter to `0`. ### Fixed - Fixed a memory violation in the Databar decoder, which would occasionally crash the engine. ## [1.1.0] - 2023-05-17 ### Added - Added experimental support for EAN-2/EAN-5 supplements (new `ean2` and `ean5` symbology options). Note that this feature is experimental: supplemental symbologies will not be enabled if you enable all symbologies (which we do not recommend). - Added an optional `onError` callback to the BarcodeReader instance. ## [1.0.9] - 2023-05-15 ### Fixed - Fixed an issue where an error in the WebAssembly engine was misinterpreted, and wrong results where generated. - Do not draw the red 'laser line' when a 2D symbology is scanned ## [1.0.8] - 2023-05-11 ### Added - Not calling `BarcodeReader.destroy()` after no longer needing a BarcodeReader is a common cause of camera access errors. A warning is now logged to the browser console if a BarcodeReader is initialized when another instance remains that was not destroyed yet. - If no `regionOfInterest` is specified in the configuration, an appropriately sized region will now be automatically selected based on the configured symbologies. ### Fixed - The horizontal targeting line in the scanning overlay was not being shown if all symbologies were enabled. ## [1.0.7] - 2023-05-06 ### Fixed - When a BarcodeReader was used in standalone display mode on iOS (PWA, added to home screen), camera access was lost when the user unfocused the PWA. An error is now displayed in this case, along with a button to resume scanning. ### Changed - Clarified acceptable use of `StrichSDK.setCustomId()`, personally identifying data must not be sent. ## [1.0.6] - 2023-04-19 ### Fixed - The combination of Enterprise offline license with analytics opt-in did not work, no usage data was sent. ## [1.0.5] - 2023-04-18 ### Fixed - Deactivating audio feedback (beep) was not possible. ### Added - Log a warning to the browser console if an invalid resolution (e.g. 'qhd') is specified in the frame source configuration. ## [1.0.4] - 2023-03-30 ### Fixed - Internal code change that addresses a "ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor" build error in older optimized Angular versions. ## [1.0.3] - 2023-03-30 ### Changed - Not setting a `duplicateInterval` in the engine configuration will now lead to a default 750ms interval to be used. ### Fixed - Ensured compatibility with iOS 16.4, do not attempt to instantiate a WebGL context on an OffscreenCanvas. ## [1.0.2] - 2023-03-23 ### Added - Activated custom logo on overlay feature (Enterprise-only). ### Fixed - Added missing fallback to medium precision on devices which do not support WebGL high precision floats. ## [1.0.1] - 2023-03-20 ### Fixed - Gracefully handle the situation where MediaStream does not implement getCapabilities() (e.g. Firefox Android). - Avoid spurious exception after `BarcodeReader.destroy()` from an asynchronous overlay update in destroyed state - Aztec code detection rectangle was not displayed on overlay for some non-compact Aztec codes. ## [1.0.0] - 2023-03-15 _This is the first public release. A special thank you to all pilot users for getting us here!_ ### Added - Log engine version on initialization. ## [0.9.11] - 2023-03-13 ### Fixed - Fixed memory access violations which manifested quickly when all symbologies are activated ## [0.9.10] - 2023-03-10 ### Changed - Force WebGL context loss when destroying WebGL resources, avoiding warning messages when too many WebGL contexts are allocated. ### Fixed - BarcodeReader.destroy() did not destroy all engine resources, leading to intermittent crashes on iOS Safari ## [0.9.9] - 2023-03-10 ### Fixed - BarcodeReader.destroy() now properly removes all elements added to the host element - Respect analyticsOptOut: false for offline-capable licenses that still want usage data ## [0.9.8] - 2023-02-28 ### Fixed - Fixed bug where online license verification was not retried on network errors, only on non-200 HTTP status codes. ## [0.9.7] - 2023-02-23 ### Fixed - Fixed accidental inclusion of dependency. ## [0.9.6] - 2023-02-22 ### Fixed - Fixed bug that prevented offline licenses from activating the SDK. ## [0.9.5] - 2023-02-22 ### Added - Activated support for Offline licenses. ## [0.9.4] - 2023-02-21 ### Fixed - Fixed a regression that caused problems reading rotated Aztec codes. ## [0.9.3] - 2023-02-14 ### Added - Added this CHANGELOG.md file to the project. ## [0.9.2] 2023-10-02 ### Changed - Started using `main` instead of `browser` target in `package.json` to avoid problems with SSR frameworks such as Next.js. ## [0.9.1] 2023-07-02 This is the first public release, distributed via NPMJS.