You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
<Labelrow="0" col="1" class="text-center c-white" textWrap="true" verticalAlignment="center" text="The scanner has been configured to detect QR codes, EAN 8 and EAN 13. It processes every 5th frame (default 10). These settings can be tweaked in your usage of the plugin."></Label>
40
+
<Labelrow="0" col="1" class="text-center c-white" textWrap="true" verticalAlignment="center" text="The scanner has been configured to detect QR codes, EAN 8 and EAN 13. It processes every 5th frame (default 10). These settings can be tweaked in your usage of the plugin. Oh, and we briefly pause the scanner after every scan, just for show."></Label>
40
41
<ListViewrow="2" col="0" colSpan="3" [items]="barcodes" class="m-t-20" backgroundColor="transparent">
Copy file name to clipboardExpand all lines: docs/ML_KIT.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,14 @@ The exact details of using the live camera view depend on whether or not you're
118
118
You can use any view-related property you like as we're extending `ContentView`.
119
119
So things like `class`, `row`, `width`, `horizontalAlignment`, `style` are all valid properties.
120
120
121
-
Plugin-specific are the optional properties `processEveryNthFrame`, `preferFrontCamera` (default `false`), and `torchOn`, and the optional `scanResult` event.
121
+
Plugin-specific are the optional properties `processEveryNthFrame`, `preferFrontCamera` (default `false`), `torchOn`, and`pause`, as well as the optional `scanResult` event.
122
122
123
123
You can set`processEveryNthFrame`set to a lower value than the default (5) to put less strain on the device.
124
124
Especially 'Face detection' seems a bit more CPU intensive, but for'Text recognition' the default is fine.
125
125
126
+
If you don't destroy the scanner page/modal but instead briefly want to hide it (but keep it alive),
127
+
you can pause the scanner with the `pause` property.
128
+
126
129
> Look at [the demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/demo-ng) to see how to wire up that `onTextRecognitionResult` function, and how to wire `torchOn` to a `Switch`.
127
130
128
131
##### Angular / Vue
@@ -142,6 +145,7 @@ Now you're able to use the registered element in the view:
142
145
height="380"
143
146
processEveryNthFrame="10"
144
147
preferFrontCamera="false"
148
+
[pause]="pause"
145
149
[torchOn]="torchOn"
146
150
(scanResult)="onTextRecognitionResult($event)">
147
151
</MLKitTextRecognition>
@@ -161,6 +165,7 @@ Declare a namespace at the top of the embedding page, and use it anywhere on the
0 commit comments