8000 navigator.mediaDevices.getDisplayMedia Ignores deviceId on macOS When Capturing Virtual Displays · Issue #1794 · flutter-webrtc/flutter-webrtc · GitHub
[go: up one dir, main page]

Skip to content

navigator.mediaDevices.getDisplayMedia Ignores deviceId on macOS When Capturing Virtual Displays #1794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ygalbrami opened this issue Mar 21, 2025 · 0 comments

Comments

@ygalbrami
Copy link

Describe the bug

navigator.mediaDevices.getDisplayMedia ignores the deviceId parameter on macOS when attempting to capture a virtual display created with flutter_virtual_display. Despite desktopCapturer.getSources correctly identifying the virtual display and the application correctly passing the deviceId, the capture defaults to the primary display. Native logs indicate start desktop capture: sourceId: (null).

To Reproduce

  1. Set up a Flutter project with flutter_webrtc and flutter_virtual_display.
  2. Use flutter_virtual_display.createDisplay to create a virtual display.
  3. Use desktopCapturer.getSources to retrieve a list of available screen sources.
  4. Verify the virtual display's id is present in the list.
  5. Call navigator.mediaDevices.getDisplayMedia with the deviceId set to the virtual display's id.
  6. Observe that the captured stream is from the primary display, not the virtual display.
  7. Check the native logs and observe start desktop capture: sourceId: (null).

Expected behavior

navigator.mediaDevices.getDisplayMedia should use the provided deviceId to capture the specified virtual display.

Platform information

  • **Flutter version: 3.29.2 * **
    Plugin version: 0.12.12+hotfix.1
    macOS: 13.7.4
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

No branches or pull requests

1 participant
0