Summary
In the desktop release, screen capture currently starts immediately without allowing the user to choose which monitor/screen to share. On multi-monitor setups, this means the app may capture the wrong screen.
I would like to confirm whether this is an acceptable v1 desktop fix before working on a PR.
Current Behavior
When clicking the screen capture panel in the desktop app, the app automatically captures one screen. There is no picker or setting to choose another monitor.
From the current implementation, the main process always returns the first screen source:
ipcMain.handle('get-screen-capture', async () => {
const sources = await desktopCapturer.getSources({ types: ['screen'] });
return sources[0].id;
});
Then the renderer uses that source ID as chromeMediaSourceId when calling navigator.mediaDevices.getUserMedia(...).
Relevant files:
src/main/index.ts
src/renderer/src/context/screen-capture-context.tsx
src/renderer/src/components/sidebar/screen-panel.tsx
Expected Behavior
When multiple screens are available, the desktop app should allow the user to choose which screen to capture.
A minimal behavior would be:
- Query all screen sources via
desktopCapturer.getSources({ types: ['screen'] })
- Show available screen sources in the screen panel
- Use the selected source ID for screen capture
- Keep the current behavior as a fallback when only one screen exists
Steps to Reproduce
- Use a machine with two or more monitors.
- Open the desktop release.
- Click the screen capture panel.
- The app starts screen capture immediately.
- There is no way to choose a different monitor.
Environment
- App: Open-LLM-VTuber-Web desktop release
- OS: Windows
- Setup: Multiple monitors
- Version: 1.2.1
Possible Implementation
One possible approach:
- Add an IPC handler that returns all available screen sources instead of only
sources[0].id.
- Store the selected screen source in the renderer state.
- Add a small screen selector UI to the screen panel.
- Pass the selected source ID into the existing
chromeMediaSourceId flow.
- Add i18n strings for English and Chinese.
This should keep the existing Electron desktopCapturer + getUserMedia approach and avoid larger changes to the capture pipeline.
Summary
In the desktop release, screen capture currently starts immediately without allowing the user to choose which monitor/screen to share. On multi-monitor setups, this means the app may capture the wrong screen.
I would like to confirm whether this is an acceptable v1 desktop fix before working on a PR.
Current Behavior
When clicking the screen capture panel in the desktop app, the app automatically captures one screen. There is no picker or setting to choose another monitor.
From the current implementation, the main process always returns the first screen source:
Then the renderer uses that source ID as
chromeMediaSourceIdwhen callingnavigator.mediaDevices.getUserMedia(...).Relevant files:
src/main/index.tssrc/renderer/src/context/screen-capture-context.tsxsrc/renderer/src/components/sidebar/screen-panel.tsxExpected Behavior
When multiple screens are available, the desktop app should allow the user to choose which screen to capture.
A minimal behavior would be:
desktopCapturer.getSources({ types: ['screen'] })Steps to Reproduce
Environment
Possible Implementation
One possible approach:
sources[0].id.chromeMediaSourceIdflow.This should keep the existing Electron
desktopCapturer+getUserMediaapproach and avoid larger changes to the capture pipeline.