-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
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
- Set up a Flutter project with
flutter_webrtcandflutter_virtual_display. - Use
flutter_virtual_display.createDisplayto create a virtual display. - Use
desktopCapturer.getSourcesto retrieve a list of available screen sources. - Verify the virtual display's
idis present in the list. - Call
navigator.mediaDevices.getDisplayMediawith thedeviceIdset to the virtual display'sid. - Observe that the captured stream is from the primary display, not the virtual display.
- 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
Metadata
Metadata
Assignees
Labels
No labels