Search Results for

    Show / Hide Table of Contents

    Class VideoPlayer

    Handles video playback and streaming, converting video frames into textures for rendering.

    Inheritance
    object
    IdentifiableObject
    DependencyObject
    AttachableObject
    PrefabInstanceObject
    Component
    Behavior
    VideoPlayer
    Implements
    IDependencyObject
    Inherited Members
    Behavior.Family
    Behavior.UpdateOrder
    Behavior.OnDetach()
    Component.Owner
    Component.Managers
    Component.ShouldBeActivated
    Component.Clone()
    Component.Attach(Entity)
    Component.OnLoaded()
    Component.OnActivated()
    Component.Start()
    Component.OnDeactivated()
    Component.OnDestroy()
    PrefabInstanceObject.PrefabSource
    PrefabInstanceObject.RefreshPrefab(Prefab)
    PrefabInstanceObject.PrefabElementId
    PrefabInstanceObject.IsPrefabInstance
    PrefabInstanceObject.IsMissingPrefabSource
    AttachableObject.AttachableStateChanged
    AttachableObject.IsEnabled
    AttachableObject.State
    AttachableObject.IsLoaded
    AttachableObject.IsAttached
    AttachableObject.IsActivated
    AttachableObject.IsStarted
    AttachableObject.IsDestroyed
    AttachableObject.Destroy()
    AttachableObject.DependencyBroken()
    DependencyObject.Dependencies
    DependencyObject.OnDependencyRemoved
    IdentifiableObject.Id
    IdentifiableObject.IdHasChanged(Guid)
    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
    Behavior.OnAttached()

    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
    Behavior.Update(TimeSpan)
    Remarks

    This method will not be executed if the Component or the Entity owning it is not Active.

    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

    Implements

    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX