From 4bb6b01b61ba70e622fe853de75641d6f408065a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Fri, 25 Apr 2025 11:57:22 +0200 Subject: [PATCH] Improve description of region capture API --- features/region-capture.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/features/region-capture.yml b/features/region-capture.yml index a59ca63c531..38f30d4455d 100644 --- a/features/region-capture.yml +++ b/features/region-capture.yml @@ -1,5 +1,14 @@ name: Region capture -description: The `CropTarget` API crops an element from a video track derived from display-capture of the active browser tab. For example, you can crop out video conferencing during screen sharing. +description: | + Region Capture is an API for cropping video tracks derived from screen-capturing a tab. + + The API consists of two parts. + + First, a `CropTarget` object is minted from an HTMLElement `e`, representing an element within the captured tab. + + Second, `cropTo()` is invoked on the video track, with the aforementioned `CropTarget` as input, after which frames deliver on that track will be cropped to `e`'s bounding box. + + Calling `cropTo(null)` restores the track to its original, uncropped form. spec: https://w3c.github.io/mediacapture-region/ compat_features: - api.BrowserCaptureMediaStreamTrack