W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2022

Re: [mediacapture-region] Refer to getBoundingClientRect as a defintion of the actual crop area (#32)

From: Elad Alon via GitHub <sysbot+gh@w3.org>
Date: Fri, 25 Mar 2022 21:39:09 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1079454813-1648244348-sysbot+gh@w3.org>
I think the following is simplest, as (1) it does not require reading multiple sections and trying to coordinate them, and (2) it does not mention "weak references", which could be misunderstood.

```
Let <var>element</var> be the Element from which CropTarget was constructed.
Calls to this method instruct the user agent to start/stop cropping a [=self-capture video track=]
to the <a href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect">
bounding client rectangle</a> of <var>element</var>.
Since the track is restricted to the visible viewport of the [=display-surface=],
the captured area will be the intersection of the visible viewport and the element
bounding client rectangle.
```

For serialization, I think we could employ a similar approach. Possibly a slot would be useful there, possibly not; but here, I think this is simplest. Wdyt?

-- 
GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/pull/32#issuecomment-1079454813 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 25 March 2022 21:39:11 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:56 UTC