Comments (2)
@sidharth-aguaws
Are you sure you did the same as the code below?
public handle(action: any, fn: string): void {
const playDeviceFacingBack = (devices: ScannerQRCodeDevice[]) => {
const device = devices.find(f => (/back|rear|environment/gi.test(f.label)));
action.playDevice(device ? device.deviceId : devices[0].deviceId);
}
if (fn === 'start') {
action[fn](playDeviceFacingBack).subscribe((r: any) => console.log(fn, r), alert);
} else {
action[fn]().subscribe((r: any) => console.log(fn, r), alert);
}
}
const device = devices.find(f => (/back|rear|environment/gi.test(f.label)));
from ngx-scanner-qrcode.
@id1945
yes also implement this but so, there is 2 problem 1st one is that switching camera is not happened and if my camera toggled it will not detect my qr code result and if we switch camera to front camera and can again same qr code it will scan the result
const playDeviceFacingBack = (devices: ScannerQRCodeDevice[]) => {
const device = devices.find(f => (/back|rear|environment/gi.test(f.label)));
action.playDevice(device ? device.deviceId : devices[0].deviceId);
}
if (fn === 'start') {
action[fn](https://github.com/id1945/ngx-scanner-qrcode/issues/playDeviceFacingBack).subscribe((r: any) => console.log(fn, r), alert);
} else {
action[fn](https://github.com/id1945/ngx-scanner-qrcode/issues/36).subscribe((r: any) => console.log(fn, r), alert);
}
}`
from ngx-scanner-qrcode.
Related Issues (20)
- Color Selection Polygon HOT 1
- Multiple scan issue HOT 3
- Does not work with small QR codes HOT 2
- Auto focus/zoom / high resolution does not work HOT 3
- Permission Camera Smartphone
- CSS documentation HOT 4
- ERROR TypeError: Cannot read properties of undefined (reading 'getUserMedia') HOT 2
- Can this implemented on Ionic Capacitor ? HOT 4
- Web app HOT 1
- Problem into nodemodules HOT 1
- ngx scanner qrcode (1.6.1) is not working on angular 12. (blank screen is coming) HOT 1
- Camera not working on localhost HOT 1
- Unable to change the default camera HOT 1
- isBeep don`t work HOT 5
- Barcode recognition using Macbook webcam doesnt work. HOT 1
- Upgrade to Angular 17 HOT 4
- isBeep does not work HOT 1
- Error on iOS when scanner used together with HttpClient.get request HOT 2
- Dependencies not working with Angular 17.0.6 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-scanner-qrcode.