mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
5.06k stars 976 forks source link

Removing or Hiding The Stop Scanning or Start Scanning Buttons #526

Open MarFranMar opened 2 years ago

MarFranMar commented 2 years ago

I am creating an internal site with a feature to scan QR Codes. And I would like to Hide or remove the button the Stop or Start Scanning Buttons. Is it possible? It is not Deal breaking or something but if it is possible, I really want to know.

mebjas commented 2 years ago

In this case how will use start or stop scanning?

Adi-18 commented 1 year ago

In this case how will use start or stop scanning?

I am with @MarFranMar . Start and stop should be possible by own buttons/script.

BTW: after successfully scan I have to stop additional scans but there is no something like html5QrcodeScanner.stop(); Please implement start() and stop()

MarFranMar commented 1 year ago

In this case how will use start or stop scanning?

Well Via Code... I purposefully call Clear() after reading the QR and Initialize it again. Well the purpose was for verification and it's done via ajax and modal. So I call Clear() after scanning and show A modal and after that modal closes I re-initialize the Scanner...

jurip89 commented 1 year ago

I am running into the same issue and I would like to know how to hide the buttons

urosran commented 10 months ago

@jurip89 you can import a css file into your JS file and do the following:

#html5-qrcode-button-camera-stop{
    visibility: hidden;
    display: none;
}

@mebjas, use case for a lot of people is either open the scanner, scan the QR code and then trigger some action based on that -- 'stop scanner' is not the most intuitive in a lot of apps and everyone has their own wording for it (e.g. "complete scan", "continue"....) unless I misread the docs, I did not find any way to customize the CSS of the scanner which I guess is the main ask of this feature request.

aside from that, you guys are fucking heroes for open sourcing this❣️ 🚀

jurip89 commented 10 months ago

Thank you a lot man

yann68980 commented 6 months ago

New solution :

delete html5QrcodeScanner;