Ability to specify capture window via CLI #3667
Labels
enhancement
Enhancement request
help wanted
Issue resolution will likely require community contributions
Is your feature request related to a problem? Please describe.
I am using CEF to host some JS code that processes a video feed with some machine vision tools, and the biggest hurdle we've run into is the only way to get video into CEF is via real or virtual webcams. This is a bit flakey and needs external software installing to work (SpoutCam or OBS).
It would be great if I could take advantage of Chrome's screen capture features to capture the contents of a specific window - it will be higher quality, not require any external tools to work, and hopefully much more reliable.
Describe the solution you'd like
I got very excited when I found
--auto-select-window-capture-source-by-title
as it's pretty much exactly what I'd likehttps://peter.sh/experiments/chromium-command-line-switches/#auto-select-window-capture-source-by-title
Then when I do this:
CEF would automatically share the window that had been specified via the CLI switch.
Right now it only seems to work for Chrome, but would be exactly what I want if it could be implemented in CEF as well. This would allow me to put the video content I want to capture in a window, shuffle it mostly off-screen, then use CEF to capture it without it having to take up screen real-estate.
Describe alternatives you've considered
Right now if I run that
navigator.mediaDevices.getDisplayMedia
command in CEF, all screens are shared, which seems to be due to this code which says "if no media ID is specified, share everything".I'd hoped it might be possible to request a specific window or Media ID from the JS side, but for security reasons, it's also not possible for JS code to request a specific Window name in code.
Specifying the window to be shared in the CEF command line switch seems like the correct place to do this, and it would restrict what is shared right now vs. the entire desktop, so hopefully not an enhanced security concern.
I also considered WebRTC streaming into CEF, but it adds a lot of complexity, and importantly - a pretty big delay. As this is on the same machine, and low-latency interactivity is the goal, using screen capture instead is much more preferable.
Additional context
While not quite the same thing, this request seems to be related to specifying screen sharing sources in #3552
The text was updated successfully, but these errors were encountered: