Skip to content

Commit

Permalink
Fix demo issue where webcam select element was not immediately visible
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkryst committed Dec 7, 2023
1 parent 6235985 commit fd6bfbe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@

<label>
Select a Video Input Device:
<span id="video-input-device-select-container"></span>
<select id="video-select" disabled>
<option value="" selected>Select a Device</option>
</select>
</label>
<label>
Body Detector Ready:
Expand Down Expand Up @@ -133,7 +135,7 @@
import {VideoRenderer} from "./js/renderer/video_renderer.js";

const deviceSelect = await Camera.getSelectElement();
document.getElementById("video-input-device-select-container").appendChild(deviceSelect);
document.getElementById("video-select").replaceWith(deviceSelect);

const mesh = new Mesh();
const bodyDetector = new BodyDetector(mesh);
Expand Down

0 comments on commit fd6bfbe

Please sign in to comment.