Intent to Prototype: Element Capture

207 views
Skip to first unread message

Elad Alon

unread,
Jul 18, 2023, 4:46:45 PM7/18/23
to blink-dev

Contact emails

elad...@chromium.org

Explainer

https://github.com/screen-share/element-capture/blob/main/README.md

Specification

https://screen-share.github.io/element-capture

Summary

API for capturing a subtree of the DOM. Given a video MediaStreamTrack obtained through pre-existing means to initiate tab-capture, Element Capture allows mutating the track to only capture a subtree of the DOM starting at a given HTMLElement. The API bears some resemblance to the Region Capture API, but affords greater flexibility for applications, because occluding and occluded content are both excluded from the capture.


Blink component

Blink>GetDisplayMedia

Motivation

Pre-existing mechanisms allow applications to capture the current tab and crop the resulting video track to the bounding box of a target-element. However: * If any elements occlude the target element, either partially or fully, they are included in the captured frames. * If any elements are partially-occluded by a partially transparent target-element, those partially-occluded elements will also be (partially) included in the captured frames. By allowing applications to restrict the capture to a subtree of the DOM rather than a subsection of the viewport, we allow the intentional exclusion of interfering content from the capture. This way, applications can robustly capture just the intended content, allowing them to offer a better experience to users.



Initial public proposal

https://github.com/WICG/proposals/issues/73

TAG review

N/A

TAG review status

Pending

Risks



Interoperability and Compatibility

N/A

Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?


Is this feature fully tested by web-platform-tests?

No

Finch feature name

ElementCapture


Launch bug

https://launch.corp.google.com/launch/4240472

Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5198989277790208

Links to previous Intent discussions

N/A

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages