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

I think there's a larger principle here - that good APIs are clear about what they do, and clarity is achieved by being explicit. If we phrase getViewportMedia as essentially "capture the entire tab's viewport," there is no question of what happens to occluding/occluded content - it's immediately clear.

However, if the API crops to the current iframe, then things become a lot less clear for the developer. Why are things cropped if no cropping was mentioned? And if we rebrand the API as getIframeMedia or something similar, things will be confusing in a different way - the difference from element-level capture would become unclear, with occluding/occluded content now behaving in unexpected ways.

IMHO, the clearest API is to just capture the entire tab, as getDisplayMedia does. Cropping can and should be an explicit extra.

-- 
GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/158#issuecomment-850865715 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 17:04:37 UTC