Git Product home page Git Product logo

Comments (5)

DeadlySystem avatar DeadlySystem commented on July 19, 2024

You can't with the current code. You need to use MediaStreamTrack.getSources to identify the individual cameras and then provide the cam's ID when accessing the webcam. But that standard is not too established yet. It works on Chrome for Android though, I created a browser-based QR code scanner with this library which allows you to select the cam, but it's not public (at least for now).

from jsqrcode.

rubensalcedo avatar rubensalcedo commented on July 19, 2024

DeadlySystem, can I have the code that you mention to test in our web application?
Thank you.

from jsqrcode.

DeadlySystem avatar DeadlySystem commented on July 19, 2024

Okay @rubensalcedo see here: https://gist.github.com/DeadlySystem/304d3da710a70ac0545c
This is compiled TypeScript, i.e. JavaScript. Please read the gist's description. Also, note that you will need to use requirejs for this to work in the posted form. You may freely use and adapt it, but when you share it please link to this Github issue. This is just a snippet from a large project, and of course it is untested in this form. But you should be able to find the important concepts.

from jsqrcode.

d00nn1 avatar d00nn1 commented on July 19, 2024

hi i have the same problem. I do not know how can I turn rear camera (environment) if they could help me I would be very grateful i want to start automatically the rear camera bicos the qr scan is for a smartphone
i found another QR scan but thets is the best of all

from jsqrcode.

DeadlySystem avatar DeadlySystem commented on July 19, 2024

Just look at my gist from my previous comment... On line 33 starts the code that does the magic. It is used to fill a , but you could easily make it select a camera automatically on line 61. I haven't tested this in a while though, it could be that the APIs have changed meanwhile.

from jsqrcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.