Lines 68-73
Link Here
|
68 |
[% END %] |
68 |
[% END %] |
69 |
[% END %] |
69 |
[% END %] |
70 |
<span id="audio-alert"></span> |
70 |
<span id="audio-alert"></span> |
|
|
71 |
|
72 |
<script> |
73 |
function detectWebcam(callback) { |
74 |
let md = navigator.mediaDevices; |
75 |
if (!md || !md.enumerateDevices) return callback(false); |
76 |
md.enumerateDevices().then(devices => { |
77 |
callback(devices.some(device => 'videoinput' === device.kind)); |
78 |
}) |
79 |
} |
80 |
|
81 |
detectWebcam(function(hasWebcam) { |
82 |
let div_take_image = document.getElementById('take_patron_image'); |
83 |
if (div_take_image) { |
84 |
div_take_image.style.display = hasWebcam ? "block" : "none"; |
85 |
} |
86 |
}); |
87 |
</script> |
88 |
|
71 |
[% IF ( footerjs ) %] |
89 |
[% IF ( footerjs ) %] |
72 |
[% INCLUDE js_includes.inc %] |
90 |
[% INCLUDE js_includes.inc %] |
73 |
[% jsinclude | $raw # Parse the page template's JavaScript block if necessary %] |
91 |
[% jsinclude | $raw # Parse the page template's JavaScript block if necessary %] |