Replace camera switch button with device list dropdown

The camera drawer now offers a select of available video input devices
instead of a cycle button. "使用摄像头" starts the chosen camera and
changing the dropdown switches the live stream; the list is populated
from enumerateDevices (real labels after permission is granted).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Xin Wang
2026-06-02 10:59:03 +08:00
parent 85baf5698e
commit 82a0cec38e
3 changed files with 68 additions and 34 deletions

View File

@@ -116,14 +116,14 @@
>
使用摄像头
</button>
<button
id="camera-flip-btn"
class="btn btn--ghost camera-drawer__source"
type="button"
<select
id="camera-device-select"
class="camera-drawer__select"
aria-label="选择摄像头"
disabled
>
切换摄像头
</button>
<option value="">默认摄像头</option>
</select>
<label
class="btn btn--ghost camera-drawer__source camera-drawer__source--upload"
>