- From: Elad Alon via GitHub <sysbot+gh@w3.org>
- Date: Tue, 21 Sep 2021 15:48:12 +0000
- To: public-webrtc@w3.org
eladalon1983 has just created a new issue for https://github.com/w3c/mediacapture-screen-share: == getViewportScreenshot (lesser brother of getViewportMedia) == Using `getViewportMedia` to obtain a single screenshot is a useful use-case that has already garnered some interest from Web-developers. However, some issues exist, motivating a variant of `getViewportMedia` to be specified, **subject to the same security-gating**. Those issues are: * When `getViewportMedia` is called, the user agent does not know ahead of time how many frames will be consumed by the application before the track is stopped. The user agent will therefore employ language that informs the user that the application is seeking permission to capture a **video** of the current tab. * Savvy users might come to suspect an application that purports in-app to be seeking a static image, but requests permission to capture a video. * Users may be confused by this prompt. * Users might come to learn the "un-lesson" that giving more permissions than intended is OK. * User agents mind end up setting up UX elements warning the users that self-capture is in session, only to take them away when the track is stopped. This flashing of UX elements to the screen for a short period of time is undesirable. Moreover, it could be especially annoying to users with accessibility readers, etc. * When a video is captured, some user agents may employ messaging which changes the size of the viewport. For example, when capturing a tab, Chrome currently presents an infobar right below the URL bar. Attempts to capture a screenshot using `getViewportMedia` on such user agents will consistently miss a portion of the viewport for no good reason. (This may even push some applications to attempt using getDisplayMedia and full-window capture - a perverse incentive.) For those reasons, I propose that after we finalize `getViewportMedia`, we add to the same document a specification of `getViewportScreenshot`. ``` partial interface MediaDevices { Promise<ImageBitmap> getViewportScreenshot(); } ``` Fine details: 1. All the same gating as getViewportMedia. 2. User agent to modify its messaging to let users know they are consenting to a single frame, not a video. All other warnings still apply. 3. Returns a single screenshot rather than a `MediaStream`, of course. Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/193 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 21 September 2021 15:48:14 UTC