DeviceScreen
Namespace: Wisej.Hybrid
Assembly: Wisej.Hybrid (4.1.0.0)
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.
Properties
IsCaptureSupported
Boolean: Gets whether screen capture is supported on the current device.
Methods
CapturePhoto()
Takes a screenshot of the device's screen.
Returns: Image. The captured screenshot. The caller owns and must dispose the returned image.
Windows captures the application window, including its WebView content.
CapturePhotoAsync()
Takes a screenshot of the device's screen.
Returns: Task<Image>. The captured screenshot. The caller owns and must dispose the returned image.
Windows captures the application window, including its WebView content.
IsRecordingSupportedAsync()
Gets whether native screen recording is available on the device.
Returns: Task<Boolean>.
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.
StartRecordingAsync(microphone)
Starts recording the device's screen.
| Parameter | Type | Description |
|---|---|---|
| microphone | Boolean | Indicates whether to include audio in the screen recording. |
Returns: Task<Boolean>. True if screen recording started successfully; otherwise, false.
StopRecording()
Stops recording the device's screen.
StopRecordingAsync()
Stops recording and returns the completed MP4 file.
Returns: Task<Byte[]>.
Events
Recording
EventHandler<MemoryStream> Occurs when a video stream from the device's screen is received.
RecordingFailed
EventHandler<DeviceException> Occurs when a recording stops unexpectedly or a background stop fails.