-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/continuous scan performance regression #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3adc257
fab6e95
71d9074
06fb791
8d1a1fb
27970d9
7c50798
3ed24c3
9cc07da
5113c27
17bf868
02be7be
9c8cedc
be0377b
81dd2e5
df9d870
6255e6e
1146996
3dab62e
2a8110d
4184c67
dcfcb5c
c2c19e9
8460c32
99c32ef
2b84580
6a705d8
2e61ace
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,4 +10,5 @@ coverage | |
| node_modules | ||
| reports | ||
| .cache | ||
| package-lock.json | ||
| .DS_STORE | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,5 +1,30 @@ | ||||
| # bedrock-web-optical-scanner ChangeLog | ||||
|
|
||||
| ## 1.1.0 - 2025-mm-dd | ||||
|
|
||||
| ### Added | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normal style is no blank line after these sub headers.
Suggested change
|
||||
| - **Frame-accurate scanning** using `requestVideoFrameCallback()` for optimal performance. | ||||
| - Automatic routing based on source type (HTMLVideoElement vs others). | ||||
| - Polling fallback method for non-video sources. | ||||
| - Ensures universal compatibility with all source types. | ||||
| - Emits warning when using slower fallback path. | ||||
| - Enhanced error messages with scan context. | ||||
| - Comprehensive architecture documentation in code. | ||||
| - Detailed comments explaining continuous scanning strategies. | ||||
| - Performance characteristics for each approach. | ||||
|
|
||||
| ### Changed | ||||
|
|
||||
bparth24 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| - Refactored `scanContinuous()` method to route by source type. | ||||
| - Maintains same public API (no breaking changes for consumers). | ||||
| - Internal implementation split into two strategies. | ||||
| - Significantly improved performance for video sources. | ||||
| - Updated error handling to include scan method context. | ||||
| - User experience: From laggy/frustrating to instant/smooth. | ||||
| - Performance regression from original `bedrock-vue-barcode-scanner` implementation. | ||||
| - Restored frame-accurate scanning that was lost during refactor. | ||||
|
|
||||
| ## 1.0.0 - 2025-10-02 | ||||
|
|
||||
| ### Added | ||||
|
|
@@ -9,38 +34,33 @@ | |||
| - Core `OpticalScanner` class with async API for scanning various formats from images, video, or other sources. | ||||
| - Plugin system for extensible scanning formats. | ||||
| - Built-in plugins for: | ||||
| - QR Code scanning (`qrCodePlugin`) | ||||
| - PDF417 barcode scanning (`pdf417Plugin`) | ||||
| - PDF417 Enhanced barcode scanning using Dynamsoft (`enhancedPdf417Plugin`) | ||||
| - MRZ scanning using Dynamsoft (`mrzPlugin`) | ||||
| - QR Code scanning (`qrCodePlugin`). | ||||
| - PDF417 barcode scanning (`pdf417Plugin`). | ||||
| - PDF417 Enhanced barcode scanning using Dynamsoft (`enhancedPdf417Plugin`). | ||||
| - MRZ scanning using Dynamsoft (`mrzPlugin`). | ||||
| - Camera utilities for: | ||||
| - Getting default camera constraints | ||||
| - Starting camera streams | ||||
| - Listing available cameras | ||||
| - Getting default camera constraints. | ||||
| - Starting camera streams. | ||||
| - Listing available cameras. | ||||
| - Uses `barcode-detector` ponyfill for cross-browser barcode detection. | ||||
| - Exports: | ||||
| - `OpticalScanner` | ||||
| - `createPlugin` | ||||
| - `cameraUtils` | ||||
| - New `CameraScanner` class for framework-agnostic scanning with unified API | ||||
| - Orchestrates video stream management with configurable container strategies | ||||
| - Handles continuous scanning with unified result formatting across scan types | ||||
| - Centralizes scanning complexity | ||||
| - Enables thin framework wrappers by abstracting low-level scanning details | ||||
| - `createTimeOutController` function in OpticalScanner for better scan timeout management | ||||
|
|
||||
| ### Improved | ||||
|
|
||||
| - Enhanced OpticalScanner debugging and timeout handling | ||||
| - Comprehensive debug logging for better troubleshooting | ||||
| - Updated documentation for improved code clarity | ||||
| - MRZ plugin structure and debugging capabilities | ||||
| - Refactored code structure for improved readability | ||||
| - Updated documentation for better maintainability | ||||
| - Overall separation of UI concerns from scanning logic for better code reusability | ||||
| - New `CameraScanner` class for framework-agnostic scanning with unified API. | ||||
| - Orchestrates video stream management with configurable container strategies. | ||||
| - Handles continuous scanning with unified result formatting across scan types. | ||||
| - Centralizes scanning complexity. | ||||
| - Enables thin framework wrappers by abstracting low-level scanning details. | ||||
| - `createTimeOutController` function in OpticalScanner for better scan timeout management. | ||||
| - Enhanced OpticalScanner debugging and timeout handling. | ||||
| - Comprehensive debug logging for better troubleshooting. | ||||
| - MRZ plugin structure and debugging capabilities. | ||||
| - Refactored code structure for improved readability. | ||||
| - Updated documentation for better maintainability. | ||||
| - Overall separation of UI concerns from scanning logic for better code reusability. | ||||
|
|
||||
| ### Changed | ||||
|
|
||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should clean up the format of entries in the same ways mentioned above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||
| - **NOTE**: CameraScanner now serves as the primary high-level interface for most scanning use cases | ||||
| - Improved modularity to support framework-agnostic design patterns | ||||
|
|
||||
| - **NOTE**: CameraScanner now serves as the primary high-level interface for most scanning use cases. | ||||
| - Improved modularity to support framework-agnostic design patterns. | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| /*! | ||
| * Copyright (c) 2025 Digital Bazaar, Inc. All rights reserved. | ||
| */ | ||
| export {CameraScanner} from './lib/camera-scanner.js'; | ||
| export {OpticalScanner} from './lib/optical-scanner.js'; | ||
| export {CameraScanner} from './lib/cameraScanner.js'; | ||
| export {OpticalScanner} from './lib/opticalScanner.js'; | ||
| export * from './lib/plugins/index.js'; | ||
| export * as cameraUtils from './lib/utils/camera.js'; |
Uh oh!
There was an error while loading. Please reload this page.