|
|
|
@ -86,7 +86,7 @@
|
|
|
|
|
<hr />
|
|
|
|
|
<img id="idCard" width="102" height="126" alt="" />
|
|
|
|
|
<script>
|
|
|
|
|
var appBasePath = navigator.userAgent.split('|')[1];
|
|
|
|
|
var appBasePath = window.chrome.webview.hostObjects.sync.dotnet.GetAppPath();
|
|
|
|
|
//window.chrome.webview.postMessage({ command: "setStatus", message: `start at ${appBasePath}` });
|
|
|
|
|
|
|
|
|
|
function onIdCardRead(card) {
|
|
|
|
@ -213,7 +213,6 @@
|
|
|
|
|
var context = canvas.getContext('2d');
|
|
|
|
|
context.drawImage(video, (video.width - width) / 2, (video.height - height) / 2, width, height, 0, 0, width, height);
|
|
|
|
|
};
|
|
|
|
|
function init() {
|
|
|
|
|
select.onchange = function (event) {
|
|
|
|
|
var hdConstraints = {
|
|
|
|
|
audio: false,
|
|
|
|
@ -237,6 +236,10 @@
|
|
|
|
|
console.error('getUserMediaErrorCallback')
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
function init() {
|
|
|
|
|
if (video.srcObject&&video.srcObject.active) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
navigator.mediaDevices.enumerateDevices()
|
|
|
|
|
.then(function (devices) {
|
|
|
|
|
select.innerHTML = "";
|
|
|
|
@ -255,7 +258,8 @@
|
|
|
|
|
console.log(err.name + ": " + err.message);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
init();
|
|
|
|
|
setInterval(init, 5000);
|
|
|
|
|
//init();
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|