Skip to main content

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.

public class DeviceScreen

Access this class through the Device singleton.

Properties​

Instance member IsCaptureSupported​

Boolean: Gets whether screen capture is supported on the current device.

Methods​

Instance member 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.

Instance member 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.

Instance member IsRecordingSupportedAsync()​

Gets whether native screen recording is available on the device.

Returns: Task<Boolean>.

Instance member StartRecording(microphone)​

Starts recording the device's screen.

ParameterTypeDescription
microphone optionalBooleanIndicates whether to include audio in the screen recording.

Returns: Boolean. True if screen recording started successfully; otherwise, false.

Instance member StartRecordingAsync(microphone)​

Starts recording the device's screen.

ParameterTypeDescription
microphone optionalBooleanIndicates whether to include audio in the screen recording.

Returns: Task<Boolean>. True if screen recording started successfully; otherwise, false.

Instance member StopRecording()​

Stops recording the device's screen.

Instance member StopRecordingAsync()​

Stops recording and returns the completed MP4 file.

Returns: Task<Byte[]>.

Events​

Instance member Recording​

EventHandler<MemoryStream> Occurs when a video stream from the device's screen is received.

Instance member RecordingFailed​

EventHandler<DeviceException> Occurs when a recording stops unexpectedly or a background stop fails.