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: README.md
+32-51Lines changed: 32 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,47 +110,23 @@ The newest API these components depend on is the [FileReader API](https://canius
110
110
- Drag-and-drop is not supported on mobile
111
111
- Home screen web apps on iOS prior to 11.3 don't support `QrcodeCapture` (see [this StackOverflow question](https://stackoverflow.com/questions/46228218/how-to-access-camera-on-ios11-home-screen-web-app))
112
112
113
-
# Troubleshooting :zap:
114
-
115
-
#### I don't see the camera when using `QrcodeStream`.
116
-
117
-
- Check if it works on the demo page. Especially the [Decode All](https://gruhn.github.io/vue-qrcode-reader/demos/DecodeAll.html) demo, since it renders error messages. If you see errors, consult the docs to understand their meaning.
118
-
- Demo works but not locally: Listen for the `init` event to investigate errors.
119
-
- Demo doesn't work: Carefully review the Browser Support section above. Maybe your device is just not supported.
120
-
121
-
#### I'm running a dev server on localhost. How to test on my mobile device without HTTPS?
122
-
123
-
- If your setup is Desktop Chrome + Android Chrome, use [Remote Debugging](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/) which allows your Android device to [access your local server as localhost](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server).
124
-
- Otherwise use a reverse proxy like [ngrok](https://ngrok.com/) or [serveo](https://serveo.net/) to temporarily make your local server publicly available with HTTPS.
125
-
- There are also loads of serverless/static hosting services that have HTTPS enabled by default and where you can deploy your web app for free. For example _GitHub Pages_, _Google Firebase_, _Netlify_, ...
126
-
127
-
#### Some of my QR codes are not being detected.
128
-
129
-
- Make sure, there is some white border around the QR code.
130
-
- Color inverted QR codes are not supported (dark background, light foreground).
131
-
-[Model 1 QR codes](https://en.wikipedia.org/wiki/QR_code#Model_1) are also not supported.
132
-
133
113
# Installation :package:
134
114
135
-
```bash
136
-
npm install vue-qrcode-reader
137
-
```
115
+
## Module import
138
116
139
-
or with Yarn:
117
+
Run:
140
118
141
119
```bash
142
-
yarn add vue-qrcode-reader
120
+
npm install vue-qrcode-reader
143
121
```
144
122
145
-
## Default import
146
-
147
-
You can either import the components independantly and register them in another
148
-
components scope:
123
+
Either import the components independantly for local registration:
Or alternatively register all of them globally right away:
140
+
Or register all of them globally right away:
165
141
166
142
```javascript
167
143
importVuefrom"vue";
@@ -172,36 +148,41 @@ Vue.use(VueQrcodeReader);
172
148
173
149
**⚠️ A css file is included when importing the package. You may have to setup your bundler to embed the css in your page.**
174
150
175
-
## Browser
176
-
177
-
> All the examples on the demo page utilize [single-file components](https://vuejs.org/v2/guide/single-file-components.html). To use them in your project you need a build tool like webpack. Check out [this fiddle](https://jsfiddle.net/2bfohnax/) for a simpler example you can use right in the browser.
151
+
## Classic import
178
152
179
-
Besides Vue you need to include the following CSS and JS file:
153
+
Vue itself must be included first. Then add the following CSS and JS file:
#### I don't see the camera when using `QrcodeStream`.
201
170
202
-
// ...
203
-
)
204
-
```
171
+
- Check if it works on the demo page. Especially the [Decode All](https://gruhn.github.io/vue-qrcode-reader/demos/DecodeAll.html) demo, since it renders error messages. If you see errors, consult the docs to understand their meaning.
172
+
- Demo works but not locally: Listen for the `init` event to investigate errors.
173
+
- Demo doesn't work: Carefully review the Browser Support section above. Maybe your device is just not supported.
174
+
175
+
#### I'm running a dev server on localhost. How to test on my mobile device without HTTPS?
176
+
177
+
- If your setup is Desktop Chrome + Android Chrome, use [Remote Debugging](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/) which allows your Android device to [access your local server as localhost](https://developers.google.com/web/tools/chrome-devtools/remote-debugging/local-server).
178
+
- Otherwise use a reverse proxy like [ngrok](https://ngrok.com/) or [serveo](https://serveo.net/) to temporarily make your local server publicly available with HTTPS.
179
+
- There are also loads of serverless/static hosting services that have HTTPS enabled by default and where you can deploy your web app for free. For example _GitHub Pages_, _Google Firebase_, _Netlify_, ...
180
+
181
+
#### Some of my QR codes are not being detected.
182
+
183
+
- Make sure, there is some white border around the QR code.
184
+
- Color inverted QR codes are not supported (dark background, light foreground).
185
+
- [Model 1 QR codes](https://en.wikipedia.org/wiki/QR_code#Model_1) are also not supported.
0 commit comments