Control for playing video streams.
    public class VideoPlayer : Control

Control node for playing video streams. Supported formats are WebM and OGV Theora.

Inheritance Chain

Constructors

    public VideoPlayer()

Properties

    public int AudioTrack { get; set; }

The embedded audio track to play.

    public bool Autoplay { get; set; }

If true playback starts when the scene loads. Default value: false.

    public int BufferingMsec { get; set; }

Amount of time in milliseconds to store in buffer while playing.

    public string Bus { get; set; }

Audio bus to use for sound playback.

    public bool Expand { get; set; }

If true the video scales to the control size. Default value: true.

    public bool Paused { get; set; }

If true the video is paused.

    public VideoStream Stream { get; set; }

    public float StreamPosition { get; set; }

The current position of the stream, in seconds.

    public float Volume { get; set; }

Audio volume as a linear value.

    public float VolumeDb { get; set; }

Audio volume in dB.

Methods

    public int GetAudioTrack()

Getter for AudioTrack

    public int GetBufferingMsec()

Getter for BufferingMsec

    public string GetBus()

Getter for Bus

    public VideoStream GetStream()

Getter for Stream

    public string GetStreamName()

Returns the video stream’s name.

    public float GetStreamPosition()

Getter for StreamPosition

    public Texture GetVideoTexture()

Returns the current frame as a Texture.

    public float GetVolume()

Getter for Volume

    public float GetVolumeDb()

Getter for VolumeDb

    public bool HasAutoplay()

Getter for Autoplay

    public bool HasExpand()

Getter for Expand

    public bool IsPaused()

Getter for Paused

    public bool IsPlaying()

Returns true if the video is playing.

    public void Play()

Starts the video playback.

    public void SetAudioTrack(int track)

Setter for AudioTrack

    public void SetAutoplay(bool enabled)

Setter for Autoplay

    public void SetBufferingMsec(int msec)

Setter for BufferingMsec

    public void SetBus(string bus)

Setter for Bus

    public void SetExpand(bool enable)

Setter for Expand

    public void SetPaused(bool paused)

Setter for Paused

    public void SetStream(VideoStream stream)

Setter for Stream

    public void SetStreamPosition(float position)

Setter for StreamPosition

    public void SetVolume(float volume)

Setter for Volume

    public void SetVolumeDb(float db)

Setter for VolumeDb

    public void Stop()

Stops the video playback.

Tags: