Class CaptureController
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalCaptureController interface provides methods that can be used to further manipulate a captured display surface (captured via GetDisplayMedia(DisplayMediaStreamOptions))
[Value("CaptureController")]
public class CaptureController : EventTarget
- Inheritance
-
CaptureController
- Inherited Members
Remarks
A CaptureController object is associated with a captured display surface by passing it into a getDisplayMedia() call as the value of the options object's controller property.
-Screen Capture API
-GetDisplayMedia(DisplayMediaStreamOptions)
-Using the Element Capture and Region Capture APIs
-Using the Captured Surface Control API
-Better screen sharing with Conditional Focus
Constructors
CaptureController()
public CaptureController()
Properties
Oncapturedmousechange
[Value("oncapturedmousechange")]
public EventHandlerNonNull Oncapturedmousechange { get; set; }
Property Value
Oncapturedzoomlevelchange
[Value("oncapturedzoomlevelchange")]
public EventHandlerNonNull Oncapturedzoomlevelchange { get; set; }
Property Value
Methods
ForwardWheel(HTMLElement?)
NOTE
ExperimentalforwardWheel() method starts forwarding Element.Wheel events fired on the referenced element to the viewport of an associated captured display surface.
[Value("forwardWheel")]
public Task<GlobalObject.Undefined> ForwardWheel(HTMLElement? element)
Parameters
elementHTMLElement
Returns
- Task<GlobalObject.Undefined>
A Promise that fulfills with GlobalObject.Undefined.
Remarks
The forwardWheel() method must be invoked via transient activation. Specifically, the only events that can successfully invoke it are click and input. In addition, the user is asked for permission to share tabs when screen capture is first attempted; if the user grants permission, this also includes permission to scroll captured tabs. If the relevant permission is already "granted", transient activation is not needed.
-Screen Capture API
-GetDisplayMedia(DisplayMediaStreamOptions)
-Using the Captured Surface Control API
GetSupportedZoomLevels()
NOTE
ExperimentalgetSupportedZoomLevels() method returns the different zoom levels that the captured display surface supports.
[Value("getSupportedZoomLevels")]
public List<long> GetSupportedZoomLevels()
Returns
- List<long>
An array of numbers representing the different zoom levels that the captured display surface supports.
Remarks
-Screen Capture API
-GetDisplayMedia(DisplayMediaStreamOptions)
-Using the Captured Surface Control API
GetZoomLevel()
[Value("getZoomLevel")]
public long GetZoomLevel()
Returns
SetFocusBehavior(CaptureStartFocusBehavior)
NOTE
ExperimentalsetFocusBehavior() method controls whether the captured tab or window will be focused when an associated GetDisplayMedia(DisplayMediaStreamOptions) {{jsxref("Promise")}} fulfills, or whether the focus will remain with the tab containing the capturing app.
[Value("setFocusBehavior")]
public GlobalObject.Undefined SetFocusBehavior(CaptureStartFocusBehavior focusBehavior)
Parameters
focusBehaviorCaptureStartFocusBehavior
Returns
- GlobalObject.Undefined
None (
undefined).
Remarks
You can set this behavior multiple times before the GetDisplayMedia(DisplayMediaStreamOptions) call, or once immediately after its Promise resolves. After that, the focus behavior is said to be finalized, and can't be changed.
-Screen Capture API
-GetDisplayMedia(DisplayMediaStreamOptions)
-Better screen sharing with Conditional Focus
SetZoomLevel(long)
[Value("setZoomLevel")]
public Task<GlobalObject.Undefined> SetZoomLevel(long zoomLevel)
Parameters
zoomLevellong