Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
brunovalenzisi committed Aug 21, 2023
1 parent fb87d00 commit cdf344d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<body>

<button id="comenzar">comenzar</button>
<div style="width: 400px; height:250px;" id="scanner-container"></div>
<select id="select" name="select"></select>
<input id="linterna" type="button" value="torch">
<div style="width: 400px; height:400px;" id="scanner-container"></div>
<select style="margin-top: 50px;" id="select" name="select"></select>
<input style="margin-top: 50px;" id="linterna" type="button" value="torch">


</body>
Expand Down
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function startScannerCam(cam) {
target: document.querySelector('#scanner-container'),
constraints: {
width: 400,
height: 250,
height: 400,
deviceId: `${cam}`
},
area: { // defines rectangle of the detection/localization area
Expand Down Expand Up @@ -116,7 +116,7 @@ function cargarSelect(result){
let select = document.getElementById("select")
select.innerHTML=''
listaDeCamaras.forEach(camara => {
select.innerHTML+=`<option value="${camara.label}">${camara.label} ${camara.deviceId} </option>`
select.innerHTML+=`<option value="${camara.label}">${camara.label}</option>`
});
select.addEventListener("change",(e)=>{
camaraId=listaDeCamaras.find((camara)=>camara.label==e.target.value).deviceId
Expand Down

0 comments on commit cdf344d

Please sign in to comment.