> 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/videoelement.md).

# VideoElement

VideoElement utilises the built-in video pipeline of Windows and can only play back those files that Windows Media Player itself can play back.

If you have a video file that cannot be played with Windows Media Player but in VLC for example, there is a chance you might make it work by switching to [VideoElementFfmpeg](/dbnetsoft/screenspro/controls/videoelementffmpeg.md).

## Properties

| Name                      | Type    | Description                                                                                                                    |
| ------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `Filename`                | String  | Either a full path to a video or a filename relative to the current XAML layout. An address containing `//` is taken as it is. |
| `Path`                    | String  | The path to the video in case `Filename` is a relative path.                                                                   |
| `Extension`               | String  | The extension used when `Filename` does not contain one.                                                                       |
| `LoopVideo`               | Boolean | Starts the video again once it has ended. Default `false`.                                                                     |
| `StartPlayingWhenVisible` | Boolean | Starts the video from the beginning every time the element becomes visible. Default `false`.                                   |
| `AbsoluteFilename`        | String  | Read-only. The full path the properties above resolve to.                                                                      |

Volume, playback position and how the picture fills the element are the standard properties of the WPF `MediaElement` this control is built on. `Stretch` defaults to `Uniform` here.

## Playback

The video starts playing as soon as it has been loaded. Every time it ends, the element raises its finished event, which a sequence can react to, and with `LoopVideo` it starts over. Loading errors are written to the log.
