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
Copy file name to clipboardExpand all lines: hello-world/README.md
+10-34Lines changed: 10 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,71 +30,47 @@ When working with the BarcodeReader class, the main method to use is [`decode`](
30
30
31
31
## Hello World in Angular
32
32
33
-
Read more in the README under "3.read-video-angular".
33
+
Read more in the README under "angular".
34
34
35
35
## Hello World in React
36
36
37
-
Read more in the README under "4.read-video-react".
37
+
Read more in the README under "react".
38
38
39
39
## Hello World in React using Hooks
40
40
41
-
Read more in the README under "13.read-video-react-hooks".
41
+
Read more in the README under "react-hooks".
42
42
43
-
## Hello World in Vue 2
43
+
## Hello World in Vue
44
44
45
-
Read more in the README under "5.read-video-vue".
46
-
47
-
## Hello World in Vue 3
48
-
49
-
Read more in the README under "6.read-video-vue3".
45
+
Read more in the README under "vue".
50
46
51
47
## Hello World in Next.js
52
48
53
-
Read more in the README under "7.read-video-nextjs".
49
+
Read more in the README under "next".
54
50
55
51
## Hello World in NuxtJS
56
52
57
-
Read more in the README under "8.read-video-nuxtjs".
53
+
Read more in the README under "nuxt".
58
54
59
55
## Hello World in Electron
60
56
61
-
Read more in the README under "9.read-video-electron".
57
+
Read more in the README under "electron".
62
58
63
59
## Hello World in PWA
64
60
65
-
Read more in the README under "10.read-video-pwa".
61
+
Read more in the README under "pwa".
66
62
67
63
## Hello World with RequireJS
68
64
69
65
This sample shows how to use the SDK in a web page based on RequireJS.
70
66
71
-
Let's quickly break down the methods used in order:
72
-
73
-
*`license`: This property specifies a license key.
74
-
*`createInstance()`: This method creates a `BarcodeScanner` object. This object can read barcodes directly from a video input with the help of its interactive UI (hidden by default) and the MediaDevices interface.
75
-
*`onFrameRead`: This event is triggered every time the SDK finishes scanning a video frame. The `results` object contains all the barcode results that the SDK have found on this frame. In this example, we print the results to the browser console.
76
-
*`onUniqueRead`: This event is triggered when the SDK finds a new barcode, which is unique among multiple frames. `txt` holds the barcode text value while `result` is an object that holds details of the barcode. In this example, an alert will be displayed on unique reads.
77
-
*`show()`: This method brings up the built-in UI of the `BarcodeScanner` object and starts scanning
78
-
79
-
Actually, it is not necessary to define both onFrameRead and onUniqueRead in the code. onUniqueRead is more commonly used because it is triggered only when a new barcode is detected, rather than on every frame.
80
-
81
67
## Hello World with ES6
82
68
83
69
This sample shows how to use the SDK in a web page based on ES6 (also known as ECMAScript 2015 or ECMAScript 6).
84
70
85
-
Let's quickly break down the methods used in order:
86
-
87
-
*`license`: This property specifies a license key.
88
-
*`createInstance()`: This method creates a `BarcodeScanner` object. This object can read barcodes directly from a video input with the help of its interactive UI (hidden by default) and the MediaDevices interface.
89
-
*`onFrameRead`: This event is triggered every time the SDK finishes scanning a video frame. The `results` object contains all the barcode results that the SDK have found on this frame. In this example, we print the results to the browser console.
90
-
*`onUniqueRead`: This event is triggered when the SDK finds a new barcode, which is unique among multiple frames. `txt` holds the barcode text value while `result` is an object that holds details of the barcode. In this example, an alert will be displayed on unique reads.
91
-
*`show()`: This method brings up the built-in UI of the `BarcodeScanner` object and starts scanning
92
-
93
-
Actually, it is not necessary to define both onFrameRead and onUniqueRead in the code. onUniqueRead is more commonly used because it is triggered only when a new barcode is detected, rather than on every frame.
94
-
95
71
## Hello World with WebView
96
72
97
-
Read more in the README under "14.read-video-webview".
0 commit comments