> For the complete documentation index, see [llms.txt](https://docs.dbnetsoft.com/dbnetsoft/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnetsoft.com/dbnetsoft/screenspro/controls/ndielement.md).

# NdiElement

This element will display a live NDI stream.

The stream is addressed by `Machine` and `Source`. Together they form the NDI source name `MACHINE (Source)`, the same name NDI Studio Monitor shows. A complete name can also be pasted into `Machine` alone, in which case `Source` stays empty.

Streams carrying an alpha channel keep their transparency, so an NDI source can be composited over the rest of the layout.

## Properties

| Name                 | Type    | Description                                                                                                                                             |
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Machine`            | String  | Name of the machine the NDI stream comes from, for example `STUDIO-PC`. A complete source name such as `STUDIO-PC (Camera 1)` is accepted here as well. |
| `Source`             | String  | Name of the NDI stream on that machine, for example `Camera 1`.                                                                                         |
| `AudioEnabled`       | Boolean | Plays the audio of the NDI stream on the default audio device. Default `false`.                                                                         |
| `Volume`             | Double  | Audio volume between `0.0` and `1.0`. Default `1.0`.                                                                                                    |
| `Stretch`            | Enum    | How the video fills the element: `None`, `Fill`, `Uniform`, `UniformToFill`. Default `Uniform`.                                                         |
| `AbsoluteSourceName` | String  | Read-only. The NDI source name built from `Machine` and `Source`.                                                                                       |

## Connecting

The receiver is opened when the element goes to **Preview** and closed again when it returns to **None**.

A source that is not announced on the network yet does not have to be waited for. The element connects by name, the NDI runtime keeps retrying, and the stream is picked up as soon as it appears. A warning listing the sources currently available is logged in that case. Names are matched ignoring case and spacing.

Failures, such as a missing NDI runtime, are reported through the element's log.

## Example

```xml
<UserControl xmlns:controls="clr-namespace:Screens.Controls;assembly=Screens.Controls">

    <controls:NdiElement Machine="STUDIO-PC" Source="Camera 1"
                         Stretch="UniformToFill"
                         Width="400" Height="300" />

</UserControl>
```
