- From: Elad Alon via GitHub <sysbot+gh@w3.org>
- Date: Fri, 25 Oct 2024 15:08:41 +0000
- To: public-webrtc-logs@w3.org
> > > The UA can prompt instead of scroll (or prompt instead of zoom +/- button). No promise needed. > > > > The established pattern is to use permission policies and return a promise through which the application can detect whether permission was granted or not. > > There's no singular pattern. Some examples of instant permission failure **without prompt**: [Emphasis mine] The emphasis on "without prompt" is mine. This renders the cited examples irrelevant to the discussion at hand, as the topic was the [claim](https://github.com/w3c/mediacapture-screen-share-extensions/issues/13#issuecomment-2429352632) that "The UA can prompt instead of scroll" and that the API can be synchronous. (A claim with which I wholeheartedly disagree.) > But when and where to prompt is often up to UAs. If we wanted the first scroll attempt to fail with a prompt, **I don't see why not.** [Emphasis mine] I have previously explained why not, but I am willing to repeat - because (i) a permission policy and (ii) an API that returns a promise, are the established pattern for API design when a prompt is a possibility, and for good reason: - They make it easy and ergonomic for user agents to prompt **asynchronously**. - They make it easy, idiomatic and ergonomic for the application to get the result of such a prompt. - They make it obvious to Web developers that a prompt might be coming. - They make it easy for users to revoke permission at any later timepoint. - They make it easy, idiomatic and ergonomic for Web applications to detect revocation and deal with it. - They make it easy, idiomatic and ergonomic for the browser to show the user the permission is among those persisted by the origin, and allow the user to manage that along with other permissions (like mic+camera). And as mentioned - the API design I propose allows **either** to prompt synchronously, asynchronously, or not at all. The choice is left up to the browser, as it should be. (Whereas the alternative, that avoids the policy and promise, does not allow true flexibility, as it's missing most of this functionality.) > That said, I'd prefer #14 to conclude with no permission needed. Just trying to untangle discussion. The API shape that includes a permission policy allows different browsers to all implement in their unique fashion, yet remain interoperable, even if no agreement is reached on the necessity of the policy and/or the prompt. Because, as has been pointed out before, browsers can have a trivial implementation of permission policies. -- GitHub Notification of comment by eladalon1983 Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share-extensions/issues/13#issuecomment-2438079096 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 25 October 2024 15:08:42 UTC