Class VideoPlayer
Handles video playback and streaming, converting video frames into textures for rendering.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Runtimes.Video
Assembly: Evergine.Runtimes.Video.dll
Syntax
public class VideoPlayer : Behavior, IDependencyObject
Properties
Autoplay
Gets or sets a value indicating whether the video should autoplay on initialization.
Declaration
public bool Autoplay { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
HWDevice
Gets or sets the hardware device type used for video decoding.
Declaration
public VideoPlayer.DeviceType HWDevice { get; set; }
Property Value
| Type | Description |
|---|---|
| VideoPlayer.DeviceType |
Loop
Gets or sets a value indicating whether the video should loop when reaching the end.
Declaration
public bool Loop { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
VideoHeight
Gets Video height in pixels.
Declaration
public int VideoHeight { get; }
Property Value
| Type | Description |
|---|---|
| int |
VideoPath
Gets or sets the path to the video file.
Declaration
public string VideoPath { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
VideoState
Gets the videoplayer state.
Declaration
public VideoPlayer.VideoStateType VideoState { get; }
Property Value
| Type | Description |
|---|---|
| VideoPlayer.VideoStateType |
VideoTexture
Gets the video texture generated.
Declaration
public Texture VideoTexture { get; }
Property Value
| Type | Description |
|---|---|
| Texture |
VideoWidth
Gets Video width in pixels.
Declaration
public int VideoWidth { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
OnAttached()
Invoked when the object is attached to the system.
Declaration
protected override bool OnAttached()
Returns
| Type | Description |
|---|---|
| bool | True if everything is OK. |
Overrides
Pause()
Pauses video playback.
Declaration
public void Pause()
Play()
Starts video playback.
Declaration
public void Play()
Stop()
Stops video playback and resets the decoder.
Declaration
public void Stop()
Update(TimeSpan)
Allows this instance to execute custom logic during its Update.
Declaration
protected override void Update(TimeSpan gameTime)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeSpan | gameTime | The game time. |
Overrides
Remarks
Events
Paused
Occurs when the video is paused.
Declaration
public event EventHandler Paused
Event Type
| Type | Description |
|---|---|
| EventHandler |
Playing
Occurs when the video begins playing.
Declaration
public event EventHandler Playing
Event Type
| Type | Description |
|---|---|
| EventHandler |
Stopped
Occurs when the video stops playing.
Declaration
public event EventHandler Stopped
Event Type
| Type | Description |
|---|---|
| EventHandler |