-
-
Notifications
You must be signed in to change notification settings - Fork 78
feat(barcode-scanning): pause and resume scan feature, cap 7 #300
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?
Conversation
|
Is this pull request related to #298? |
Partially it resolves #298 too. We didn't test web version. On Androidif On iOSIt fill stop capture session (freeze) until resumeScan called |
|
@bakai-dev-team It should freeze the camera view. Otherwise, this feature is useless since you can do the same in the webview (just remove the listener). |
On IOS it's already behaves as you mentioned. How can we do the same on Android? |
|
@bakai-dev-team I haven't looked into it yet. It's part of the issue to find that out. |
|
@robingenz All done as you required. Anyone who can check and confirm that it is works, you are welcome. |
|
@robingenz HI, could you please check PR, thanks |
|
PR is still failing. |
|
@robingenz Hello, fix lint, prettier. could you please check PR, thanks |
@capacitor-mlkit/barcode-scanning
@capacitor-mlkit/document-scanner
@capacitor-mlkit/face-detection
@capacitor-mlkit/face-mesh-detection
@capacitor-mlkit/selfie-segmentation
@capacitor-mlkit/subject-segmentation
@capacitor-mlkit/translation
commit: |
|
@robingenz Hello, fix lint, prettier. could you please check PR, thanks |
robingenz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested your implementation on all platforms?
| /** | ||
| * Pause scanning for barcodes. | ||
| * | ||
| * @since 7.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @since 7.3.1 | |
| * @since 7.5.0 |
If we manage to release it this week, it would be version 7.5.0.
| /** | ||
| * Resume scanning for barcodes. | ||
| * | ||
| * @since 7.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @since 7.3.1 | |
| * @since 7.5.0 |
If we manage to release it this week, it would be version 7.5.0.
| if (!this.videoElement) { | ||
| throw new Error(this.errorVideoElementMissing); | ||
| } | ||
| if (!this.stream) { | ||
| throw new Error('Stream is not available, call startScan first.'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plugin should behave the same on all platforms. It should either return an error on Android or iOS as well, or on none on all platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bakai-dev-team This is still open.
| /** | ||
| * Pause scanning for barcodes. | ||
| * | ||
| * @since 7.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @since 7.5.0 | |
| * @since 8.1.0 |
Next version will be 8.1.0.
| /** | ||
| * Resume scanning for barcodes. | ||
| * | ||
| * @since 7.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @since 7.5.0 | |
| * @since 8.1.0 |
| "strict": true, | ||
| "target": "es2017" | ||
| "target": "es2017", | ||
| "types": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert that change. It's not related to this feature. You may need to install the latest version of @types/node as dev dependency if you have type issues.
|
|
||
| async isSupported(): Promise<IsSupportedResult> { | ||
| return { supported: this._isSupported }; | ||
| return {supported: this._isSupported}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please format the code correctly and run npm run fmt.
| if (!this.videoElement) { | ||
| throw new Error(this.errorVideoElementMissing); | ||
| } | ||
| if (!this.stream) { | ||
| throw new Error('Stream is not available, call startScan first.'); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bakai-dev-team This is still open.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset).