Skip to content

host: a fallback monitor choice must not be written into settings - #10

Open
manar-mk wants to merge 1 commit into
mainfrom
fix/sticky-display-id
Open

manar-mk wants to merge 1 commit into
mainfrom
fix/sticky-display-id

Conversation

@manar-mk

Copy link
Copy Markdown
Owner

What changes / Что меняется

select-source сохраняет displayId только тогда, когда монитор выбран кликом в панели.

Why / Зачем

Если хост стартует раньше, чем подцепился виртуальный монитор, pickSource() не находит ничего
под settings.displayId и откатывается на основной экран. Дальше панель при старте захвата
переотправляет текущий выбор, select-source его сохранял — и settings.displayId навсегда
указывал на основной монитор. Каждый следующий запуск захватывал главный экран, и на iPad
приезжала уменьшенная копия рабочего стола вместо второго монитора.

Поймано сегодня на этой машине: ffmpeg работал на ddagrab=output_idx=0 (3840×2160), а
виртуальный дисплей 1024×768 стоял незанятым на output_idx=1.

How it was tested / Как проверено

  • npm test passes
  • Tried on a real host: Windows 11 — после возврата displayId на виртуальный монитор хост
    поднялся на capture output 1, 60 fps, задержка 5 мс
  • Tried with a real iPad: iPad mini 1, iOS 9.3.5, по USB — картинка и звук идут

Checklist

  • User-visible strings — нет новых
  • Docs — не требуется
  • No secrets, no personal paths, no binaries

🤖 Generated with Claude Code

When the host starts before the virtual monitor is attached, pickSource() finds
nothing matching settings.displayId and falls back to the primary screen. The
panel then re-sends that selection as capture starts, select-source saved it,
and from then on settings.displayId pointed at the primary: every later run
captured the main screen and the iPad showed a shrunken copy of it instead of
the second monitor. Found on this machine — ffmpeg was running on
ddagrab=output_idx=0 (3840x2160) with the 1024x768 virtual display sitting
unused at output 1.

Only an actual click in the monitor picker persists now.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@manar-mk manar-mk added the bug Something isn't working label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant