Re: [mediacapture-screen-share] Multi-capture (concurrent capture of multiple surfaces) (#204)

@jan-ivar for camera sources, the behavior of `navigator.mediaDevices.enumerateDevices` is useful for web developers.
e.g. `let videoSources = (await navigator.mediaDevices.enumerateDevices()).filter((source) => source.kind === 'video')` lets the web app display its own picker.
(note that on Safari, the browser first needs to have been given permission to access one of the devices by the user before `enumerateDevices` works, presumably for privacy issues)

Following your suggestion, and avoiding a potentially complex picker, one idea would be to have something like Electron's DesktopCapturer.getSources() (possibly without the thumbnails): https://www.electronjs.org/docs/latest/api/desktop-capturer

Something like this: `navigator.mediaDevices.enumerateDisplaySurfaces()`
Which could also have a kind (screen, window, tag), allowing web apps to further filter, e.g.
`let windows = (await navigator.mediaDevices.enumerateDisplaySurfaces()).filter((source) => source.kind === 'window')`

Like with a device, the browser could then simply prompt the user `this web page would like access to the list of windows`

Or only prompt if the options passed to `enumerateDisplaySurfaces` contains `{thumbnail:true}`

@jan-ivar and @eladalon1983 my main interest is gathering the `{top,left,width,height,z-order}` of the streams returned by calls to `getDisplayMedia`, and this issue does not feel like the right place. Where else do you suggest I post this enhancement idea?


-- 
GitHub Notification of comment by ldenoue
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/204#issuecomment-1041316496 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 February 2022 10:03:06 UTC