# DeviceMedia

Namespace: **Wisej.Hybrid**

Assembly: **Wisej.Hybrid** (3.5.0.0)

Provides properties and methods to interact with device media.

{% tabs %}
{% tab title="C#" %}

```csharp
public class DeviceMedia
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class DeviceMedia
```

{% endtab %}
{% endtabs %}

Access this class through the [Device](/hybrid/start/api/general/wisej.hybrid.device.md) singleton.

## Constructors

### ![](/files/CCV9PPenlC1YZvNh1I6R)DeviceMedia()

Initializes a new instance of [DeviceMedia](/hybrid/start/api/media/wisej.hybrid.devicemedia.md).

## Properties

### ![](/files/CCV9PPenlC1YZvNh1I6R)CaptureSupported

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets whether capturing media is supported on the device.

## Methods

### ![](/files/CCV9PPenlC1YZvNh1I6R)CapturePhoto(quality)

Takes a photo using the device's camera.

| Parameter   | Type                                                          | Description |
| ----------- | ------------------------------------------------------------- | ----------- |
| **quality** | [Double](https://docs.microsoft.com/dotnet/api/system.double) |             |

**Returns:** [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte). The photo from the device.

### ![](/files/CCV9PPenlC1YZvNh1I6R)CaptureVideo(quality)

Takes a video using the device's camera.

| Parameter   | Type                                                          | Description |
| ----------- | ------------------------------------------------------------- | ----------- |
| **quality** | [Double](https://docs.microsoft.com/dotnet/api/system.double) |             |

**Returns:** [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte). The video stream.

### ![](/files/CCV9PPenlC1YZvNh1I6R)PickPhoto(quality)

Picks a photo from the device's library.

| Parameter   | Type                                                          | Description |
| ----------- | ------------------------------------------------------------- | ----------- |
| **quality** | [Double](https://docs.microsoft.com/dotnet/api/system.double) |             |

**Returns:** [Image](https://docs.microsoft.com/dotnet/api/system.drawing.image). The photo.

### ![](/files/CCV9PPenlC1YZvNh1I6R)PickVideo(quality)

Picks a video from the device.

| Parameter   | Type                                                          | Description |
| ----------- | ------------------------------------------------------------- | ----------- |
| **quality** | [Double](https://docs.microsoft.com/dotnet/api/system.double) |             |

**Returns:** [Byte\[\]](https://docs.microsoft.com/dotnet/api/system.byte). The device stream.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/hybrid/start/api/media/wisej.hybrid.devicemedia.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
