DeviceScreen
Namespace: Wisej.Hybrid
Assembly: Wisej.Hybrid
Provides methods for interacting with the device's screen, including taking screenshots and screen recording.
- C#
- VB.NET
public class DeviceScreen
Public Class DeviceScreen
Access this class through the Device singleton.
Constructors
DeviceScreen()
Initializes a new instance of DeviceScreen.
Methods
CapturePhoto()
Takes a screenshot of the device's screen.
Returns: Image. An Image representing the captured screenshot.
Note: There may be issues in Windows as documented here: https://github.com/MicrosoftEdge/WebView2Feedback/issues/2799
StartRecording(microphone)
Starts recording the device's screen.
| Parameter | Type | Description |
|---|---|---|
| microphone | Boolean | Indicates whether to include audio in the screen recording. |
Returns: Boolean. True if screen recording started successfully; otherwise, false.
StopRecording()
Stops recording the device's screen.
Events
Recording
EventHandler<MemoryStream> Occurs when a video stream from the device's screen is received.