-
Notifications
You must be signed in to change notification settings - Fork 28
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
Can I share some Windows? #280
Comments
This already seems possible. E.g. this: button.onclick = async () => await Promise.all([0,1,2].map(async () => {
videos[i++].srcObject = await navigator.mediaDevices.getDisplayMedia({video: true});
})); ...works in all browsers and should prompt the user 3 times for different apps to share and then share them simultaneously. Since all three calls to getDisplayMedia are invoked at once (on the same task), any browser vendor interested in experimenting with presenting the user with an optimized picker for this situation should be able to. |
This use case is a good example of where the browsers' auto focus behavior is undesirable. Fortunately, the spec has a fix for this, but it's not broadly implemented yet. It'd be something like: button.onclick = async () => await Promise.all([0,1,2].map(async () => {
const controller = new CaptureController;
controller.setFocusBehavior("focus-capturing-application");
videos[i++].srcObject = await navigator.mediaDevices.getDisplayMedia({video: true, controller});
})); |
I think OP would not appreciate having to remember which 5 windows he had previously chosen to share, when the 6th prompt is put up. That's where w3c/mediacapture-screen-share-extensions#8 would be helpful. |
s it feasible to write this way now? I can share three applications directly at the same time |
@trookie2000, asking clearer questions will help you get clearer answers. |
What do you mean by "at the same time"?
|
No browser implements that today, but I think that we should. w3c/mediacapture-screen-share-extensions#8 |
The OP was sharing 3 windows, not 5. With my updated fiddle keeping track of what's been selected is not too bad: It's also trivial to mix tab, window and desktop sharing, something that would be difficult to do from within a browser prompt without introducing a similar level of complexity. The fiddle can also trivially be extended to allow changing individual choices later, an often desirable feature that is easy to miss if we focus solely on the initial picking problem. |
In my opinion, it is in fact hard. Users are busy people juggling multiple tasks. They shouldn't be expected to give the tedious task of picking N windows the same attention they give an IQ test. We can make it dead simple for them. But full disclosure - implementing getDisplayMediaSet is not currently on my plan for the next year. Given that even if you do come around to my way of thinking on this, still neither of us would implement it in the near future, perhaps we could let this topic rest until such a time as someone has renewed interest in getDisplayMediaSet. I mention this out of respect for your time. Up to you. |
What about capturing three applications simultaneously in a virtual desktop environment? Specifically, I don't want the application to appear three video tags to capture the shared application in turn (in fact, the user doesn't know how many to share, it could be three, or five, so should we write five video tag?) I think it works pretty well#204,But I don't know how difficult it is to achieve. |
@trookie2000 sorry I'm not exactly sure what you're asking, but here's an updated fiddle that only creates video elements as needed, for as many captures as you want (but still prompts for each one in current browsers). In today's browsers this should keep asking the user to pick a window until the user hits "Not Now" when they've added as many as they want. Or so I thought. Turns out they don't bail out, and allows the app to prompt spam instead. I've filed bug 1854259 on this in Firefox. Feel free to open bugs on other browsers. |
My idea is to allow users to select one or more Windows in a screen sharing session and overlay them on a background picture of their choice. |
@trookie2000 You can do what you are asking for today. The only problems are from a UX perspective, where browsers will show multiple "I'm-capturing-stuff" bars at the top of the window, and that the user has to go through the flow to select a window each time... there isn't an option to Ctrl+Click or something like that to add more. |
Duplicate of w3c/mediacapture-screen-share-extensions#8 |
Let's say I have six apps on my desktop and I can choose to share three of them at the same time.
The text was updated successfully, but these errors were encountered: