Add system mute control via setMute action
Introduce a setMute protocol action and an NAudio-backed AudioControlService so the Android client can toggle the Windows render endpoint mute state over WebSocket. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ namespace WirelessTextSyncer.Windows.Tray;
|
||||
public sealed class TrayApplicationContext : ApplicationContext
|
||||
{
|
||||
private readonly KeyboardInjectionService keyboard;
|
||||
private readonly AudioControlService audio;
|
||||
private readonly WebSocketServerService server;
|
||||
private readonly DiscoveryResponderService discovery;
|
||||
private readonly NotifyIcon notifyIcon;
|
||||
@@ -21,7 +22,8 @@ public sealed class TrayApplicationContext : ApplicationContext
|
||||
AppLogger.Info("Tray application starting.");
|
||||
uiContext = SynchronizationContext.Current ?? new WindowsFormsSynchronizationContext();
|
||||
keyboard = new KeyboardInjectionService();
|
||||
var handler = new SyncMessageHandler(keyboard);
|
||||
audio = new AudioControlService();
|
||||
var handler = new SyncMessageHandler(keyboard, audio);
|
||||
|
||||
server = new WebSocketServerService(handler);
|
||||
server.StatusChanged += (_, _) => uiContext.Post(_ => UpdateTrayStatus(), null);
|
||||
@@ -62,6 +64,7 @@ public sealed class TrayApplicationContext : ApplicationContext
|
||||
connectedIcon.Dispose();
|
||||
waitIcon.Dispose();
|
||||
discovery.Dispose();
|
||||
audio.Dispose();
|
||||
server.Dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user