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

Re: [mediacapture-region] Why expose produceCropTarget at MediaDevices level? (#11)

From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
Date: Thu, 03 Feb 2022 20:51:49 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1029390172-1643921508-sysbot+gh@w3.org>
> @youennf prefers exposing Element.cropTarget(). 

@eladalon1983 AFAICT Youenn prefers Element.cropTarget, not Element.cropTarget().

I think he makes a good case for why an attribute is most idiomatic given the properties we want. However, there are a LOT of Elements compared to the rarity of needing a [cropTarget](https://w3c.github.io/mediacapture-region/#crop-target) from one — [0.005%](https://chromestatus.com/metrics/feature/timeline/popularity/2619) of pageloads use `getDisplayMedia` and only a fraction of those will likely be interested cropping. So this gives me pause.

Presumably, the cropTarget would be instantiated in the getter if it doesn't exist, rather at Element construction time, but this getter might be implicitly called by code libraries or even browser tools interrogating the Element (e.g. dumped to web console).

That said, there's precedent for rarely used features in Element.requestFullscreen() which is a method, so maybe Element.cropTarget() would be the right tradeoff?

cc @annevk Thoughts on this?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 3 February 2022 20:51:52 UTC

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