Skip to content

Add Windows client - #2

Merged
sciamop merged 4 commits into
mainfrom
windows-client
Oct 5, 2026
Merged

sciamop merged 4 commits into
mainfrom
windows-client

Conversation

@sciamop

@sciamop sciamop commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Electron client for the existing Mac host (protocol v1, H.264, no host changes): Bonjour discovery, PIN login, virtual-display settings, WebCodecs decoding with ack-based flow control, keyboard/mouse/text input, fullscreen and stats. A CI workflow builds, tests and smoke-tests the packaged app.

Fix: stall on "Waiting for the first frame…"

VideoToolbox writes the H.264 SPS without VUI bitstream_restriction, so Chromium's decoders assume frame reordering and hold 4+ frames before output. That deadlocks against the host's 3-frame in-flight window ("Video decoding stalled"). The client rewrites the SPS to declare max_num_reorder_frames = 0, which is accurate because the host disables reordering. With a mock host replaying a VideoToolbox-style stream, the first frame went from ~1.0 s (rescued only by the software-decoder fallback) to 26–87 ms on the hardware decoder at 1080p, 1440p and 4K.

Windows key → Command in fullscreen

While the stream is fullscreen and focused, a low-level keyboard hook (via koffi) captures the Windows key and sends it as Mac Command instead of opening Start. Windows+L and Ctrl+Alt+Del stay with the system.

Saved Macs

☆ Save next to the port bookmarks an address. Saved Macs show as chips above Nearby Macs and fill in the address and port with one click. The PIN is never stored.

Test plan

  • npm test (9/9, including SPS rewrite tests)
  • npm run test:smoke
  • Mock-host repro: 3 frames in flight, format before each keyframe, idle screen
  • Injected Win+C in fullscreen arrives as Command+C
  • Bookmarks: save, reload, fill in, remove
  • CI packaged build and smoke test (checks koffi packaging)
  • Manual test against a real Mac (decode fix)

🤖 Generated with Claude Code

sciamop and others added 4 commits October 5, 2026 15:31
Electron client for the existing Mac host (protocol v1, H.264): Bonjour
discovery, PIN login, virtual-display settings, WebCodecs decoding with
ack-based flow control, keyboard/mouse/text input, fullscreen and stats.

- Rewrite the H.264 SPS to declare max_num_reorder_frames = 0.
  VideoToolbox omits VUI bitstream_restriction, so Chromium's decoders
  buffered a full DPB (4+ frames) before output and deadlocked against
  the host's three-frame window ("Waiting for the first frame…" /
  "Video decoding stalled"). The host disables reordering, so this is
  accurate.
- In fullscreen, capture the Windows key with a low-level keyboard hook
  (koffi) and send it to the Mac as Command instead of opening Start.
- CI workflow builds, tests and smoke-tests the packaged app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save the current address and port with ☆ Save; saved Macs appear as
chips above nearby Macs and fill in the address with one click. Stored
in local app data; the PIN is never saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sciamop
sciamop merged commit ca7f56c into main Oct 5, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant