Commit 868bae4
fix(screen_recorder): record the screen, not the webcam, on macOS
avfoundation enumerates cameras before screens, so passing screen_index
straight through to -i selects device 0 — the built-in camera on any Mac
that has one. The tool then silently records the user's face while the
caller believes it is capturing the screen, with no error to reveal it.
That is a privacy problem as much as a correctness one:
screen_capture_selector advertises this tool as "no webcam" (and routes
webcam overlay work to cap_recorder), and screen_index is documented as a
monitor index, not a device index. The Windows and Linux branches do not
take screen_index at all, so the mac branch was the only one leaking a
platform device numbering into a cross-platform parameter.
Map the monitor index to its real avfoundation device index by parsing
-list_devices, falling back to the raw index when detection fails.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYThSL15CujvBwD1wuUmr91 parent 4eab34c commit 868bae4
1 file changed
Lines changed: 26 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
57 | 79 | | |
58 | 80 | | |
59 | 81 | | |
| |||
328 | 350 | | |
329 | 351 | | |
330 | 352 | | |
| 353 | + | |
| 354 | + | |
331 | 355 | | |
332 | 356 | | |
333 | | - | |
| 357 | + | |
334 | 358 | | |
335 | 359 | | |
336 | | - | |
| 360 | + | |
337 | 361 | | |
338 | 362 | | |
339 | 363 | | |
| |||
0 commit comments