Feature(web): Add toolbar audio toggle button
This commit is contained in:
@@ -55,6 +55,8 @@ struct WebDeviceInfo {
|
||||
int screen_width;
|
||||
int screen_height;
|
||||
bool online;
|
||||
// 当前会话的音频开关。-1=未知(客户端 BITMAPINFO 还没回来),0=关,1=开
|
||||
int audio_enabled = -1;
|
||||
|
||||
// Keyframe cache for new web clients
|
||||
std::vector<uint8_t> keyframe_cache;
|
||||
@@ -98,6 +100,10 @@ public:
|
||||
// Resolution change notification
|
||||
void NotifyResolutionChange(uint64_t device_id, int width, int height);
|
||||
|
||||
// Audio enable/disable notification — pushes current state to all web
|
||||
// clients watching this device and caches it for newcomers.
|
||||
void NotifyAudioState(uint64_t device_id, bool enabled);
|
||||
|
||||
// Cursor change notification (called from ScreenSpyDlg)
|
||||
void BroadcastCursor(uint64_t device_id, uint8_t cursor_index);
|
||||
|
||||
@@ -129,6 +135,7 @@ private:
|
||||
void HandleMouse(void* ws_ptr, const std::string& msg);
|
||||
void HandleKey(void* ws_ptr, const std::string& msg);
|
||||
void HandleRdpReset(void* ws_ptr, const std::string& token);
|
||||
void HandleAudioToggle(void* ws_ptr, const std::string& token);
|
||||
|
||||
// Token management
|
||||
std::string GenerateToken(const std::string& username, const std::string& role);
|
||||
|
||||
Reference in New Issue
Block a user