chromium/third_party/blink/renderer/modules/mediastream/browser_capture_media_stream_track.idl

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[Exposed = Window]
interface BrowserCaptureMediaStreamTrack : MediaStreamTrack {
  // https://w3c.github.io/mediacapture-region/
  [CallWith = ScriptState, RaisesException,
   RuntimeEnabled = RegionCapture, MeasureAs = RegionCapture]
  Promise<undefined> cropTo(CropTarget? crop_id);

  // https://screen-share.github.io/element-capture/
  [
    CallWith = ScriptState,
    RaisesException,
    RuntimeEnabled = ElementCapture,
    MeasureAs = ElementCapture
  ] Promise<undefined> restrictTo(RestrictionTarget? target);
};