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

@@ -287,7 +287,27 @@ body {
cursor: pointer;
}
/* Upload spans the full width on its own row below camera + switch. */
.camera-drawer__select {
appearance: none;
width: 100%;
min-height: 38px;
background: var(--bg-soft);
color: var(--text);
border: 1px solid var(--border);
border-radius: 10px;
padding: 7px 28px 7px 10px;
font: inherit;
font-size: 13px;
outline: none;
cursor: pointer;
}
.camera-drawer__select:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Upload spans the full width on its own row below camera + device list. */
.camera-drawer__source--upload {
grid-column: 1 / -1;
}