Hi the code will be part of the template that I will link to this video - there is some last moment hickup with publishing the template. For now the code is here: function onScanSuccess(decodedText, decodedResult) { // Handle the scanned code as desired, e.g., display the text console.log(`Code matched = ${decodedText}`, decodedResult); document.getElementById('qr-reader-results').innerText = `Scanned Result: ${decodedText}`; window.location.href=decodedText; } function onScanFailure(error) { // For debugging purposes console.warn(`Code scan error = ${error}`); } window.addEventListener('load', () => { // Adjust configuration for mobile devices const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent); let config = { fps: 10, qrbox: {width: 250, height: 250}, aspectRatio: isMobile ? 1 : undefined, facingMode: isMobile ? "environment" : "user", }; let html5QrcodeScanner = new Html5QrcodeScanner( "qr-reader", config, /* verbose= */ false); html5QrcodeScanner.render(onScanSuccess, onScanFailure); });
Look forward to it!
Hi Hendrik! Got the template! you can test it out here! dub.sh/sailing-club-template
thank you! great presentation.
Glad it was helpful!
Amazing where would we get the Java Script from im a bit of a nocode person.
Hi the code will be part of the template that I will link to this video - there is some last moment hickup with publishing the template.
For now the code is here:
function onScanSuccess(decodedText, decodedResult) {
// Handle the scanned code as desired, e.g., display the text
console.log(`Code matched = ${decodedText}`, decodedResult);
document.getElementById('qr-reader-results').innerText = `Scanned Result: ${decodedText}`;
window.location.href=decodedText;
}
function onScanFailure(error) {
// For debugging purposes
console.warn(`Code scan error = ${error}`);
}
window.addEventListener('load', () => {
// Adjust configuration for mobile devices
const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
let config = {
fps: 10,
qrbox: {width: 250, height: 250},
aspectRatio: isMobile ? 1 : undefined,
facingMode: isMobile ? "environment" : "user",
};
let html5QrcodeScanner = new Html5QrcodeScanner(
"qr-reader",
config,
/* verbose= */ false);
html5QrcodeScanner.render(onScanSuccess, onScanFailure);
});
Hi just published the template - you can find it here: dub.sh/sailing-club-template
Let me know how it works!
Your genius ive been looking for a solution like this for years even trying to make my own.@@BusinessAutomatedTutorials