Skip to main content

DeviceScreen

Namespace: Wisej.Hybrid

Assembly: Wisej.Hybrid

Access screenshot and recording operations through Device.Screen. This page describes the published 4.1.4 XML contract, not the newer source branch. A method in the contract does not establish complete native support; check Platform Capabilities.

Constructors​

DeviceScreen()​

Use the Device.Screen singleton.

Properties​

IsCaptureSupported​

bool: whether screen capture is supported on the connected device.

Methods​

CapturePhoto()​

Takes a screenshot and returns an image. The package XML notes a Windows WebView2 limitation; see WebView2 issue 2799. Dispose a returned image after its owning view no longer needs it.

CapturePhotoAsync()​

The asynchronous screenshot method returns the captured image.

StartRecording(microphone)​

Starts screen recording. microphone is a Boolean parameter indicating whether audio is requested. Returns whether recording started. Platform implementation and permission checks are required.

StartRecordingAsync(microphone)​

The asynchronous start method is present in the published XML.

StopRecording()​

Requests that screen recording stop. The published 4.1.4 XML does not define a result-returning StopRecordingAsync method.

Events​

Recording​

EventHandler<MemoryStream>: receives the recording stream. Subscribe while the owning view needs the result and unsubscribe on disposal.

Source-only changes​

StopRecordingAsync, RecordingFailed and IsRecordingSupportedAsync occur in newer source work and are not documented by the published 4.1.4 XML. The source also describes native recorder limitations, export limits and stream ownership. Track these through Release Notes and the Showcase example; do not copy a newer recording recipe into a package-based application without checking the installed contract and native implementation.