- electron/remote.js: WebSocket client that connects to central server
- Smart URL builder: domain+443→wss://, IP/non-443→ws://, http/https→ws/wss
- UUID token auth on connect
- Auto-reconnect with exponential backoff (3s→60s)
- Handles commands: start_stream, stop_stream, update_stream, stop_all
- Sends: devices, stream_status, logs
- Ping/pong keepalive every 25s
- Self-signed cert allowed for local IPs (192.168.x, 10.x, .local)
- electron/main.js: IPC handlers remote-connect/disconnect/get-url,
generate-token; forwards commands to FFmpeg, status to renderer
- electron/preload.js: exposes remoteConnect, remoteDisconnect,
remoteGetUrl, generateToken, onRemoteStatus, onRemoteCommand
- src/components/RemoteSettings.jsx: new UI tab
- Server + port fields (default 443, auto wss/ws)
- URL preview
- Token display with copy + regenerate
- Machine name field
- Connection status bar with animated states
- src/App.jsx: Remote tab added, remote state persisted to config
- src/styles/App.css: remote status bar, token display, actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Bump to major version 2.0.0: app becomes a managed agent
with optional remote control via WebSocket server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PowerShell on Russian Windows outputs text in CP1251/CP866 by default.
Node.js reads stdout as UTF-8 → Cyrillic becomes mojibake.
Fix: force UTF-8 output at the start of every PowerShell command:
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8;
$OutputEncoding = [System.Text.Encoding]::UTF8;
Receive stdout as raw Buffer (encoding:'buffer'), strip UTF-8 BOM
if present, then decode explicitly with .toString('utf8').
Also fixed runCommand() to collect chunks into Buffer arrays and
decode as UTF-8 (FFmpeg always outputs UTF-8 regardless of locale).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tray icon:
- Replaced SVG DataURL approach (broken on Windows) with
nativeImage.createFromBuffer() using raw RGBA pixel data
- Draws rounded background + play triangle + red dot pixel-by-pixel
- Falls back to pre-generated tray-icon.png if present (build output)
- makeWindowIcon() also loads from assets/icon.png when available
Exit confirmation:
- confirmAndQuit() always shows dialog — previously only asked
when activeCount > 0, so quit with no streams skipped the dialog
- Dialog shows active stream count in detail text
- Tray menu relabeled in Russian with emoji markers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: PowerShell command was wrapped in exec() with double-quote
escaping that silently failed. Rewrote using execFile() with args array
which requires no manual escaping.
Changes:
- electron/devices.js: use execFile('powershell.exe', [...args]) for
window enumeration — eliminates quoting issues entirely
- Window list now returned INSIDE getDevices() video array (type='window')
so they arrive together with cameras/screens in one IPC call
- StreamSettings: windows grouped from devices.video directly, with 🪟
emoji prefix for visual distinction
- Added inline "↻ Обновить" button in video source field header to
refresh devices+windows on demand without switching tabs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>