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

(Kudos to @jan-ivar for a very nice summary of the issue so that I didn't have to read the whole thread after being pinged. Or at least, his summary convinced me I don't; hopefully that was correct ^_^.)

So to be clear, by "weak reference" here you mean something that has the characteristics:

- Uniquely refers to the element in question across process boundaries
- Does not retain a reference to the element across process boundaries

Back when I was last involved in discussing this API, I think I suggested a weak reference-type solution specifically based on using the string `element.id`. This mostly meets the above properties, under the assumption that developers aren't creating multiple elements in a single page with the same ID. (This is a fair assumption IMO; if developers do the bad thing, then just pick the first such element.) It also has the great benefit of already existing.

Note that it obtains the second property via the tuple `(event.source, element.id)`, not just via `element.id` alone, so I guess you'd have to pass that into `cropTo()`.

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


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

Received on Thursday, 28 April 2022 19:15:12 UTC