Re: [mediacapture-screen-share] Add ability to crop a MediaStream obtained through the share-this-tab API (#158)

Background for those not involved - @jan-ivar, @youennf and I have been discussing whether a call to getViewportMedia should return the entire tab's viewport, or only of the viewport of the iframe from which getViewportMedia was called.

@jan-ivar and @youennf, here's another issue. When getViewportMedia is called, the user is prompted to approve the capture. It is very likely that the user agent will want to show the user a **visual preview** of what they are about to share. Showing anything short of the entire tab is going to be potentially misleading, since the iframe can always be resized at a later time to encompass a larger portion of the top-level. I think a reasonable user agent will always show a preview of the entire tab, even if the iframe - at the time gVM is invoked - is only p% of the tab.

I think we will have an inelegant and misleading API if we show the user[*] one thing, but hand the application something else. I think the elegant solution is to give the entire tab by default, and crop as a variant (additional parameter, later function call, etc.) Wdyt?

[*] The user can also be a web-app developer who will be quite confused after refactoring their code to call gVM from iframe/another-iframe/top-level, suddenly seeing the same preview but getting a differently cropped track, despite no explicit mention of cropping.

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


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

Received on Saturday, 29 May 2021 16:51:55 UTC