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

[mediacapture-region] Why exposing produceCropTarget at MediaDevices level? (#11)

From: youennf via GitHub <sysbot+gh@w3.org>
Date: Tue, 25 Jan 2022 12:48:44 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-1113848942-1643114923-sysbot+gh@w3.org>
youennf has just created a new issue for https://github.com/w3c/mediacapture-region:

== Why exposing produceCropTarget at MediaDevices level? ==
Looking at the algorithm, it seems the same CropTarget object will be created if produceCropTarget is called several times on the same element.
That would probably be specified by adding a CropTarget slot on HTMLElement directly.
This would also solve probably the cloning element cropTarget issue.

The second question is whether below API might not be better suited:
partial interface HTMLElement {
  readonly attribute Promise<CropTarget> cropTarget;
}
I am also wondering why we even need a promise there.
It seems implementations could produce a cropTarget synchronously without any IPC, which would end up with:

partial interface HTMLElement {
  readonly attribute CropTarget cropTarget;
}

Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/11 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 25 January 2022 12:48:46 UTC

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