densen2014 / ZXingBlazor

Using ZXing Scan barcode/QR code in blazor
Apache License 2.0
93 stars 39 forks source link

Select camera #24

Closed kaffedax closed 11 months ago

kaffedax commented 1 year ago

In the last update of Safari or iOS my app now presents 4 alternative cameras.. front/back/sideways and ultrawide back... Before it was only 2, front and back, with the default set to back. (Still works like that on Android)

Can I force it to chose the back camera? Best of all I would want to set the camera to back and not present the select/droplist that only appears on the second initiating of the page.. The first time the page use it it's correct.. so I could reload the page for it every time to make it work... but then I need to ask for the camera access every time...

Why does the select/droplist appear the second time? Can I prevent this?

Im using it in a blazor server app..

densen2014 commented 1 year ago

give me a screen shot or video record

densen2014 commented 1 year ago

image

here is the key codes for select default camera, you can fork the project and do some debug, and PR it.

Thanks again for your issue

kaffedax commented 1 year ago

Hello Alex,

Thank you for your reply and that you took time for answering my question. My personal problem got solved thank you very much. I did some some small changes setting device id to [1] (default back on android and iphone) and hid the SelectPanel.

[image: image.png]

I also made a fork and push if it is to use for someone else. (but for my own app I used a local nuget repository/update)

Thanks for the great work and have a nice day

Best regards, Rikard

//Take a look at the attached file IphoneScreenshot.jpg from an iphone13 for the original problem, sorry for the swedish

  1. = Front camera
  2. = Back camera
  3. = Ultrawide back camera
  4. = Table mode/90 degree angel

Den tis 21 feb. 2023 kl 16:35 skrev Alex chow @.***>:

[image: image] https://user-images.githubusercontent.com/8428709/220388933-42f9a5c7-c737-4e95-9caf-917c166a2e56.png

here is the key codes for select default camera, you can fork the project and do some debug, and PR it.

Thanks again for your issue

— Reply to this email directly, view it on GitHub https://github.com/densen2014/ZXingBlazor/issues/24#issuecomment-1438686756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRVH336F2MLW446IAHCX4DWYTODRANCNFSM6AAAAAAU2IZVDA . You are receiving this because you authored the thread.Message ID: @.***>

densen2014 commented 1 year ago

Hello Alex, Thank you for your reply and that you took time for answering my question. My personal problem got solved thank you very much. I did some some small changes setting device id to [1] (default back on android and iphone) and hid the SelectPanel. [image: image.png] I also made a fork and push if it is to use for someone else. (but for my own app I used a local nuget repository/update) Thanks for the great work and have a nice day Best regards, Rikard //Take a look at the attached file IphoneScreenshot.jpg from an iphone13 for the original problem, sorry for the swedish 1. = Front camera 2. = Back camera 3. = Ultrawide back camera 4. = Table mode/90 degree angel Den tis 21 feb. 2023 kl 16:35 skrev Alex chow @.>: [image: image] https://user-images.githubusercontent.com/8428709/220388933-42f9a5c7-c737-4e95-9caf-917c166a2e56.png here is the key codes for select default camera, you can fork the project and do some debug, and PR it. Thanks again for your issue — Reply to this email directly, view it on GitHub <#24 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRVH336F2MLW446IAHCX4DWYTODRANCNFSM6AAAAAAU2IZVDA . You are receiving this because you authored the thread.Message ID: @.>

thanks for your work! i will test tomorrow morning.

densen2014 commented 1 year ago

can you test again:

  1. open thie link https://blazor.app1.es/barcodescanner
  2. in frist time only a camera, open it next time will be show the camras list?

and if you can, do some test with this, i will help me confirm the exact fault

  1. https://blazor.app1.es/screencapture it can be auto list all camera?