Class CropTarget
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalCropTarget interface of the {{domxref("Screen Capture API", "Screen Capture API", "", "nocode")}} provides a static method, FromElement(Element), which returns a CropTarget instance that can be used to crop a captured video track to the area in which a specified element is rendered.
[Value("CropTarget")]
public class CropTarget
- Inheritance
-
CropTarget
- Inherited Members
Remarks
Constructors
CropTarget()
public CropTarget()
Methods
FromElement(Element)
NOTE
ExperimentalfromElement() static method of the CropTarget interface returns a CropTarget instance that can be used to crop a captured video track to the area in which a specified element is rendered.
[Value("fromElement")]
public static Task<CropTarget> FromElement(Element element)
Parameters
elementElement
Returns
- Task<CropTarget>
A {{jsxref("Promise")}} that resolves to a CropTarget object instance, which can then be passed to CropTo(CropTarget?) to crop the video captured in the track to just the area the specified DOM element is rendered in.
CropTargetobjects are serializable. They can be passed to another document using mechanisms such as PostMessage(dynamic, string, List<Object>).
Remarks
Because the Region Capture API crops to an area of the current browser tab rather than capturing a specific element, any content drawn on top of the cropped area will be shown in the capture.
-Screen Capture API
-Using the Element Capture and Region Capture APIs