sagnik Posted February 18, 2018 Posted February 18, 2018 I need to create a QRCode reader, which immediately gives the data of qrcode as it has read successfully and produces a beep sound. I've tried to find that type of library but I couldn't find almost anything. But yes, I've found one named "WebCodeCamJquery" but I couldn't implement it properly so it doesn't works. Here is the link to "WebCodeCam": https://atandrastoth.co.uk/main/pages/plugins/webcodecamjs/. It works perfectly on the website but not in mine.
sagnik Posted February 18, 2018 Author Posted February 18, 2018 https://whatsnew.cf/mpanelThe link will require you to login. But you have root access so here is the path to the file: "/home/sgn/public_html/wn/mpanel/accounts/login.php"
sagnik Posted February 19, 2018 Author Posted February 19, 2018 I can provide you the script which is in a zip archive. Will it be good for you?
Krydos Posted February 19, 2018 Posted February 19, 2018 No, install your qrcode thing somewhere that isn't password protected.
sagnik Posted February 20, 2018 Author Posted February 20, 2018 Here is the link to my implementation: https://m.whatsnew.cf/test.php
Krydos Posted February 20, 2018 Posted February 20, 2018 Fix this Uncaught DOMException: Failed to construct 'Worker': Script at 'https://cdn.sgnetworks.cf/jquery/plugins/WebCodeCam/js/DecoderWorker.js' cannot be accessed from origin 'https://m.whatsnew.cf'. at Plugin.init (https://cdn.sgnetworks.cf/jquery/plugins/WebCodeCam/js/webcodecamjquery.js:547:32) at https://m.whatsnew.cf/test.php:68:12
sagnik Posted February 20, 2018 Author Posted February 20, 2018 I've not seen the error before. Anyway it looks like the script is not accessible outside the domain. I hope I've got it right!
sagnik Posted February 21, 2018 Author Posted February 21, 2018 Well I couldn't see such an error. Only I'm seeing is an Warning:navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMediaAnd I'm using Mozilla Firefox.
sagnik Posted February 21, 2018 Author Posted February 21, 2018 Yeah! I got it. The error is shown in Google Chrome. But I don't understand why the script is not accessible in chrome when Firefox is getting the script properly. Here is my .htaccess of "cdn.sgnetworks.cf":<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^ver-[0-9]+.[0-9]+.[0-9]+(.*)$ $1 [L,NC] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,L] RewriteBase / RewriteOptions InheritDown </IfModule> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Credentials "true" Header set Access-Control-Max-Age "86400" Header set Access-Control-Allow-Methods "GET" Header set Access-Control-Allow-Headers: x-requested-with </IfModule>Okay, I fixed that now. Actually Chrome doesn't allows Cross-Origin Service Workers and I fixed it but still it's not working. You can check it here: https://m.whatsnew.cf/test.php
Krydos Posted February 22, 2018 Posted February 22, 2018 It looks like the error is now DOMException: Requested device not found
sagnik Posted February 22, 2018 Author Posted February 22, 2018 What does it means? What type of device?If you meant the WebCam, then I don't have an Webcam on my PC so I'm using my Android phone as Webcam with DroidCamX to test the QRCode scanner.And I've not got the error before.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now