We introduce a performant and robust API for cropping a self-capture video track. (Recall that applications may *already* video-capture the tab in which the application is run using getDisplayMedia(). Using our new Region Capture, such an application may now *crop* that track and remove some content from it; typically before sharing it remotely.)
Remaining open issues with Mozilla and Apple:
Other topics under discussion mostly deal with changes to spec-language, and will not affect the shipped API. Exception - serializability, but that wouldn't break Web-apps (since it's mostly opaque to the application, which would typically only postMessage the CropTarget and use it on the other side).
N/A
Unchallenging to use.
This is a mechanism by which an application purposefully strips away information which it already has access to (via pre-existing mechanisms such as getDisplayMedia).
N/A
-
OriginTrial desktop last | 101 |
OriginTrial desktop first | 98 |
P.S: Requesting to ship gaplessly.On Monday, March 21, 2022 at 9:13:30 PM UTC+1 Elad Alon wrote:Explainer
https://github.com/w3c/mediacapture-region/blob/main/README.mdSpecification
https://w3c.github.io/mediacapture-region/Summary
We introduce a performant and robust API for cropping a self-capture video track. (Recall that applications may *already* video-capture the tab in which the application is run using getDisplayMedia(). Using our new Region Capture, such an application may now *crop* that track and remove some content from it; typically before sharing it remotely.)
Blink component
BlinkTAG review
https://github.com/w3ctag/design-reviews/issues/710TAG review status
Not applicableTAG was positive: "Thank you for bringing this to our attention, and we are happy to see this proposal move forward."They did suggest a change of name (Region Capture -> Tab Region Capture), but that does not affect the API. This proposal to refine the name will be brought up with the WG.Risks
Interoperability and Compatibility
Remaining open issues with Mozilla and Apple:
- The name "CropTarget" - see https://github.com/w3c/mediacapture-region/issues/18. No alternative has yet been presented which garnered more support than "CropTarget". This seems unlikely to change.
- Whether produceCropTarget should return a Promise<CropTarget> or a CropTarget - see https://github.com/w3c/mediacapture-region/issues/17. In internal discussions we have consensus that returning a Promise is preferrable. However, if the WG settles on returning a CropTarget directly, a migration plan would be needed to ensure Web applications are not broken. This would be easier if such a change is either not made at all, or is made in concert with the next bullet-point.
- API surface of produceCropTarget - see https://github.com/w3c/mediacapture-region/issues/11. We want MediaDevices.produceCropTarget(), whereas Apple wants Element.produceCropTarget or possibly Element.cropTarget(). Should the WG settle on Apple's current preference, migration would be very easy, as we can first expose on the new surface *in addition* and then deprecate the old surface gradually. Moreover, such a migration would actually have the potential of making a (Promise<CropTarget> -> CropTarget) migration simpler, should such a change also be adopted by the WG.
It may be better to ask actual web developers regarding the least confusing option amongst those proposed.
Sync vs. async cropTarget creation seems like something you'd want to decide on before shipping.
You mentioned on the thread that the browser can refuse to mint new cropTargets in some cases. What happens then? Is it specified? How are developers supposed to defensively program their API use against that?
If minting couldn't fail, then (naively) writing the process/origin<->token mapping in the browser process could've been done async, while the creation of the token could be sync.
This seems mostly like a developer ergonomics question. As such, (and like above) a signal from web developers could go a long way to break the tie.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfUZueknsW5KhHd0F6-tdSQND_QBCCiD0fyYZ5prGjR2Kw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/7dad6c95-c653-a8d7-d50d-69ab16bdf442%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-DxUfEeNT4ffftE-d_k5nBVVF2oLNY8W_GP1bRRWBn7w%40mail.gmail.com.
Hi Youav, the WG is making progress in https://github.com/w3c/mediacapture-region/issues/11#issuecomment-1112514784 with good feedback from other Google folks. This progress suggests a likelihood the WG will go a different direction here, which means Chrome shipping now would most likely create a web compatibility headache. Can it be held off a month to resolve this?The referenced TAG meeting notes, say it's "Not the TAG's job to pick a winner" which seems to conflict with a LGTM. The WG is making progress, so it seems premature to expect the TAG to call disputes, which it sounds like they're saying. Also:
- The statement "interoperability is an imperative ... not what is most technically pure" seems out of place wrt Origin trials. If interoperability with an Origin Trial is now a thing, it's an argument to stop having them.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/653356b8-bda8-4ad8-8c4d-215c85bb1cb9n%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw-FwU5o7VTCHBuMzUko9A2rHkbTKDRCjvZr3YKSeyvMYQ%40mail.gmail.com.
Thanks Yoav for taking the time to get involved with the issues. As you mentioned, #11 is resolved by a PR we're working to merge, which means there are only 2 "points of contention".I noticed performance is absent from your points of contention. which I think reflects great progress made in #17 in just a week, since that was a claim from the Chrome team earlier that I think we put to bed.
#48 was opened just 5 days ago when we discovered Chrome had previously undisclosed needs here (the spec says it cannot fail). It seems early to call this one (unless you're tied to a certain outcome).I find the characterization of people trying to be helpful as "back-seat implementation design" unfortunate, since Chome's claims to the WG were about implementation hardship, claiming few if any actual web developer benefits from their design. I think that sets the terms of conversation to be about implementation, and short of responding with "not our problem, we disagree this is hard to implement", I'm not sure what we could have said that wouldn't be characterized this way.
I'm concerned that what Chrome would ship would not be what ends up being standardized, given how issues are progressing.
This is not the same state we found ourselves in earlier, since some issues have been solved and others found. Since a major customer voiced in #17 they were open to any of the proposed spec alternatives,
it seems odd that the Chrome team is holding on to what amounts to minor design aspects
they've been unable to defend or demonstrate much web developer benefit from.
Following the Region Capture spec change at https://github.com/w3c/mediacapture-region/issues/64, CropTarget.fromElement() is not exposed to workers anymore. The rationale is that workers do not have access to the DOM, and by consequence to Element.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/d787822c-891c-43cb-bf41-ef1a222e1382n%40chromium.org.