Fix camera for ios maybe?
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julius 2022-06-12 09:28:46 +02:00
parent e38bf8ac8b
commit 1258bfe3a1
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2
2 changed files with 4 additions and 5 deletions

View file

@ -22,8 +22,8 @@
<header class="navbar"> <header class="navbar">
<section class="navbar-section"> <section class="navbar-section">
<a href="/" class="navbar-brand mr-2">Tickets</a> <a href="/" class="navbar-brand mr-2">Tickets</a>
<a href="/password" class="btn btn-link">Verander Wachtwoord</a> <a href="/password" class="btn btn-link hide-md">Verander Wachtwoord</a>
<a href="/add_user" class="btn btn-link">Voeg nieuwe gebruiker toe</a> <a href="/add_user" class="btn btn-link hide-md">Voeg nieuwe gebruiker toe</a>
<a href="/logout" class="btn btn-link">Logout</a> <a href="/logout" class="btn btn-link">Logout</a>
</section> </section>
</header> </header>

View file

@ -18,9 +18,8 @@
Scannen</button> </p> Scannen</button> </p>
<h4><span id="last-scanned">Nog geen gescand</span></h4> <h4><span id="last-scanned">Nog geen gescand</span></h4>
<h3><span id="scan-status">Nog geen gescand</span></h3> <h3><span id="scan-status">Nog geen gescand</span></h3>
<video autoplay hidden="true"></video>
<div class="columns"> <div class="columns">
<canvas id="qr-canvas" class="column col-12"></canvas> <video autoplay playsinline controls="false" class="column col-12"></video>
</div> </div>
</div> </div>
<div class="columns"> <div class="columns">
@ -180,7 +179,7 @@
setInterval(() => { setInterval(() => {
console.log("scanning now?") console.log("scanning now?")
const canvas = document.getElementById("qr-canvas"); const canvas = document.createElement("canvas");
canvas.width = videoElement.videoWidth; canvas.width = videoElement.videoWidth;
canvas.height = videoElement.videoHeight; canvas.height = videoElement.videoHeight;
canvas.getContext("2d").drawImage(videoElement, 0, 0); canvas.getContext("2d").drawImage(videoElement, 0, 0);