Re: [mediacapture-region] Can the MediaStreamTrack list its cropping regions directly? (#6)

This comment continues the discussion of `expose-on-track`. Please note that, as per my previous comment, I argue that this should be a **later improvement**.

> ```
> interface MediaStreamTrackRegion {
>     USVString origin;
>     DOMString name;
> }
> ```

I think we want these to be `readonly`.

Assume we (later) extends `produceCropId()` to receive `name` as a parameter. (The `origin` is inferred from the call-site.) There's a decision to be made here. Do we...
1. ...reject `produceCropTarget(name)` if the pair `(name, origin)` is not unique because of earlier calls?
2. ...add a random field that ensures uniqueness?
3. ...specify that two CropTargets with the same fields can nevertheless be distinct? That is, that there might be an unexposed property that's part of any comparison?

My order of preference is currently with no1 as the most preferred and no3 as the least preferred.

> This token is only visible to trusted parties, i.e. the top level frames or frames that are deemed capturing in the name of the top level frame. I think this gives a good enough story.

It's a credible story only so long as we don't try to reuse this mechanism for cropping non-own-tabs. I think we should hold off on this proposal (adding `origin` and `name` to `CropTarget`) until we are sure we don't want to extend the API to deal with cropping non-self-captures, or until we discuss a way to make it safe there, too. Let's please leave all of these topics out of scope for now.

-- 
GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/6#issuecomment-1021598188 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 20:53:08 UTC