HuggingFace-SK commited on
Commit
a17f398
·
1 Parent(s): 995854b

hide switch btn until camera loads

Browse files
Files changed (1) hide show
  1. templates/browser-detect.html +4 -3
templates/browser-detect.html CHANGED
@@ -30,14 +30,14 @@
30
 
31
  <video id="webcam" style="display:none" autoplay="" playsinline=""></video>
32
  <div class="canvas_wrapper" id="canvas_wrapper">
33
- <button id="switch-camera" style="position: absolute; top:10px; left:10px; padding:5px; height:40px; width:40px; text-align: center; border-radius: 12.25px; font-size: 20px; font-weight: 900; border:none; background-color: #f2f2f2; color:black;
34
  box-shadow: 0px 4px 20px 4px rgba(0, 0, 0, 0.38); z-index:100">
35
  <span>⟳</span>
36
  </button>
37
  <canvas class="output_canvas" id="output_canvas" width="100%" height="300%"></canvas>
38
  <center>
39
- <button id="webcamButton">
40
- <span>ENABLE WEBCAM</span>
41
  </button>
42
  </center>
43
  </div>
@@ -179,6 +179,7 @@
179
  else {
180
  webcamRunning = true;
181
  enableWebcamButton.style = "display:none"
 
182
 
183
  }
184
  // getUsermedia parameters.
 
30
 
31
  <video id="webcam" style="display:none" autoplay="" playsinline=""></video>
32
  <div class="canvas_wrapper" id="canvas_wrapper">
33
+ <button id="switch-camera" style="display:none; position: absolute; top:10px; left:10px; padding:5px; height:40px; width:40px; text-align: center; border-radius: 12.25px; font-size: 20px; font-weight: 900; border:none; background-color: #f2f2f2; color:black;
34
  box-shadow: 0px 4px 20px 4px rgba(0, 0, 0, 0.38); z-index:100">
35
  <span>⟳</span>
36
  </button>
37
  <canvas class="output_canvas" id="output_canvas" width="100%" height="300%"></canvas>
38
  <center>
39
+ <button id="webcamButton" style="font-weight: 600; color:black;">
40
+ <span>Enable Webcam</span>
41
  </button>
42
  </center>
43
  </div>
 
179
  else {
180
  webcamRunning = true;
181
  enableWebcamButton.style = "display:none"
182
+ document.getElementById("switch-camera").style = "display:block"
183
 
184
  }
185
  // getUsermedia parameters.