CaptureController Class
The controller of a capture of a display surface (https://w3c.github.io/mediacapture-screen-share/#dom-capturecontroller), given to getDisplayMedia(): the application tells whether the captured surface gets the focus.
public sealed class CaptureController : EventTarget- Inheritance
EventTargetCaptureController
Constructors
| Name | Description |
|---|---|
| CaptureController() | Creates a controller. |
CaptureController()
DisplayMedia.csCreates a controller.
public CaptureController()Methods
| Name | Description |
|---|---|
| SetFocusBehavior(CaptureStartFocusBehavior) | Sets whether the captured surface gets the focus when the capture starts (https://w3c.github.io/mediacapture-screen-share/#dom-capturecontroller-setfocusbehavior). It can be called before the capture starts, or once right after it started (until the next task) when the surface is a window or a tab. |
SetFocusBehavior(CaptureStartFocusBehavior)
DisplayMedia.csSets whether the captured surface gets the focus when the capture starts (https://w3c.github.io/mediacapture-screen-share/#dom-capturecontroller-setfocusbehavior). It can be called before the capture starts, or once right after it started (until the next task) when the surface is a window or a tab.
public void SetFocusBehavior(CaptureStartFocusBehavior focusBehavior)Parameters
focusBehaviorCaptureStartFocusBehavior- The focus behavior.
Exceptions
DomException- An
InvalidStateError: the capture failed or stopped, the surface is a monitor, or the decision was made.