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_webrtc
andflutter_virtual_display
. - Use
flutter_virtual_display.createDisplay
to create a virtual display. - Use
desktopCapturer.getSources
to retrieve a list of available screen sources. - Verify the virtual display's
id
is present in the list. - Call
navigator.mediaDevices.getDisplayMedia
with thedeviceId
set 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