20 Commits

Author SHA1 Message Date
Xin Wang
0928169106 Update image in camera drawer 2026-06-02 15:34:50 +08:00
Xin Wang
89d0777830 Update voice demo camera drawer 2026-06-02 13:22:08 +08:00
Xin Wang
aae751f3f3 Update voice demo language problem 2026-06-02 12:31:34 +08:00
Xin Wang
82a0cec38e 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>
2026-06-02 10:59:03 +08:00
Xin Wang
85baf5698e Improve camera drawer UX: layout, device switching, default selection
- Grid layout for source controls: camera + switch on top row (equal
  width), upload full-width below; preview area uses aspect-ratio 4/3
- "使用摄像头" no longer changes label text; uses is-active highlight only
- "切换摄像头" now actually cycles through real video devices via
  enumerateDevices(); falls back to facingMode flip on mobile/single-cam;
  button disabled until camera is active and ≥2 devices are detected
- Default-selects first sample image when drawer opens so "拍摄完成"
  is immediately pressable without requiring a capture/upload first
- Fix: camera prompt text is now locked to CAMERA_STATE_PROMPTS[state]
  and no longer overwritten by assistant replies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 10:43:18 +08:00
Xin Wang
6cf31c7062 Center camera text and bind text with state 2026-06-02 09:55:38 +08:00
Xin Wang
21f6c17388 Add image upload in conversation 2026-06-02 08:24:53 +08:00
Xin Wang
f22df60873 Update voice demo copy button 2026-06-01 09:52:09 +08:00
Xin Wang
0913f8e655 Update voice demo chat id handling 2026-06-01 09:44:44 +08:00
Xin Wang
402ad81cb6 Add chatId in ws connection 2026-05-31 22:46:48 +08:00
Xin Wang
b4804c3884 Update voice demo center text 2026-05-28 15:08:42 +08:00
Xin Wang
a5839e5668 Update camera drawer font to lighter 2026-05-28 15:03:28 +08:00
Xin Wang
966dadda38 Add camera drawer for voice demo 2026-05-28 14:52:44 +08:00
Xin Wang
2d5fd65721 Add demo page shows state code 2026-05-28 10:01:27 +08:00
Xin Wang
003a4abe8c Collapse high-frequency audio frames in the demo websocket log.
Expandable groups keep protocol and text events readable while still allowing per-frame inspection when debugging audio traffic.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-23 10:21:50 +08:00
Xin Wang
0d82acc0d2 Remove xfyun asr interim in frontend 2026-05-22 09:40:16 +08:00
Xin Wang
404381c818 Add xfyun asr service 2026-05-21 15:42:49 +08:00
Xin Wang
f3eab5b272 Add audio logging and WebSocket enhancements to webpage
- Introduced new state properties for audio send logging.
- Implemented functions to flush audio send logs and handle binary data sending.
- Updated WebSocket logging to differentiate between send and receive actions.
- Enhanced UI layout and styles for better responsiveness and usability.
- Improved overall structure and readability of the code.
2026-05-21 14:25:20 +08:00
Xin Wang
092f532f51 Update webpage 2026-05-21 14:11:45 +08:00
Xin Wang
53d2f5233d first vesion 2026-05-21 13:08:40 +08:00