JIT
Create a script that contains an input text box with id="scriptcase-input-txt".
Create a script that contains an input text box with id="scriptcase-input-txt". Add one button with id = "scriptcase-btn-scan". Add event using javascript native or libraries as needed, to perform or trigger the needed functionality. When the user uses their smartphone iphone browser like Chrome or Safari, it must open the iphone's camera. The camera must behave a barcode and QR scanner. Scanning barcodes is more important then QR codes. Once the barcode is scanned with the camera, the captured value, must be passed into input text box.
Updated files
v1
It is not starting the camera after the button is clicked. Force starting the camera

Okay, let's adjust the JavaScript to explicitly request the camera stream and set it as the video source before starting the decoder. This approach can sometimes be more reliable in ensuring the camera starts.

Updated files
v2