Re: [mediacapture-region] What should the spec say about elements like HTMLAudioElement? (#51)

> Sure, the same problem would have been observed with a div-containing-a-player, if the player happened to obscure something. But that case makes it clearer to the developer that they're capturing "what's in the div" and not "the player". It's a lesser issue.

No it is the exact same issue. I would like you to address what I [already wrote on that](https://github.com/w3c/mediacapture-region/issues/51#issuecomment-1139903549) so we don't go in circles:

"We're not capturing the "element", we're capturing whatever CSS determines is rendered top-most at the pixel coordinates determined by the element's bounding rectangle, which may be pixels that have nothing to do with the element. So to speak of other rendering showing through behind round corners and calling that a "footgun" frankly has me worried about whether this API has received the scrutiny and vetting it deserves."

If you're claiming the user somehow expects cropping to an "element" to somehow be safe from leaks of other information in the viewport (behind, around or on-top) or be anything other than a pixel-cropping operation of the viewport image, then we have an API fail, and we should change the API to make it clearer to web developers what the actual functionality exposed does and what it's side-effects are. 

> This implementation-specific shape is peculiar to HTMLAudioElement and perhaps a handful other Elements.

Lastly, web developers can already crop to any element [using trial and error and pixel coordinates](https://webrtc.github.io/samples/src/content/insertable-streams/video-crop/), which is _more_ likely to produce surprising undesirable results across browsers: the cropping coordinates may appear fine in Chrome but cut off elements in say Firefox, or work some of the time but break at other times due to unforseen layout or language changes. Being able to specify an element would only improve the situation and the user agent's ability to include the necessary vendor-specific rendering.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/51#issuecomment-1139940415 using your GitHub account


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

Received on Friday, 27 May 2022 18:50:42 UTC