Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (74 loc) · 2.24 KB
/
Copy pathindex.html
File metadata and controls
74 lines (74 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!doctype html>
<html>
<head>
<title>Scanner demo</title>
<style type="text/css">
.scanner-laser{
position: absolute;
margin: 40px;
height: 30px;
width: 30px;
}
.laser-leftTop{
top: 0;
left: 0;
border-top: solid red 5px;
border-left: solid red 5px;
}
.laser-leftBottom{
bottom: 0;
left: 0;
border-bottom: solid red 5px;
border-left: solid red 5px;
}
.laser-rightTop{
top: 0;
right: 0;
border-top: solid red 5px;
border-right: solid red 5px;
}
.laser-rightBottom{
bottom: 0;
right: 0;
border-bottom: solid red 5px;
border-right: solid red 5px;
}
</style>
</head>
<body>
<h1>Barcode and QR-code reader demo.</h1><br>
<div style="position: relative;display: inline-block;">
<canvas id="qr-canvas" width="320" height="240"></canvas>
<div class="scanner-laser laser-rightBottom" style="opacity: 0.5;"></div>
<div class="scanner-laser laser-rightTop" style="opacity: 0.5;"></div>
<div class="scanner-laser laser-leftBottom" style="opacity: 0.5;"></div>
<div class="scanner-laser laser-leftTop" style="opacity: 0.5;"></div>
</div>
<br>
<a href = "http://atandrastoth.co.uk/main/pages/plugins/codereader/">See a full featured demo.</a>
</body>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"> </script>
<script type="text/javascript" src="js/qrcodelib.js"></script>
<script type="text/javascript" src="js/WebCodeCam-0.0.1.js"></script>
<script type="text/javascript">
$('#qr-canvas').WebCodeCam({
ReadQRCode: true,
ReadBarecode: true,
width: 320,
height: 320 * 3 / 4,
flipVertical: false,
flipHorizontal: false,
zoom: -1,
beep: "js/beep.mp3",
autoBrightnessValue: false,
brightness: 0,
grayScale: false,
contrast: 0,
threshold: 0,
sharpness: [],
resultFunction: function(resText, lastImageSrc) {
alert(resText);
}
});
</script>
</html>