Re: [mediacapture-screen-share] Conditional Focus (When Display-Capture Starts) (#190)

> did you consider passing a callback to getUserMedia() or dispatching an event to take care of this instead?

(Assuming you mean `getDisplayMedia`.)

I have considered that.

If the callback is executed **before** resolving the Promise, we have a way for the application to interact with an MediaStream before the Promise that returns it is resolved. This seems like a footgun to me; now gDM might return a Promise to a MediaStream that's had its video track removed, or a new video track inserted. Oy.

If the callback is executed **after** resolving the Promise, then when exactly? As a scheduled next microtask? Task? We end up in a new version of the same discussion, and we leave footguns lying around with intervening tasks/microtasks that could end up taking too long to execute, closing the window on account of the 1s (or other value) limit.

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


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

Received on Friday, 1 October 2021 11:50:32 UTC