reckfellENGINE

VideoStreamPlayer

UI control for video and its audio playback.

On this page
class VideoStreamPlayerReckfellSharpInherits Control

Assign a VideoStream resource, add VideoStreamPlayer to the tree and call Play, or configure Autoplay beforehand. File format and seeking accuracy depend on the stream implementation. Built-in VideoStreamTheora loads Ogg Theora .ogv; renaming another file does not add codec support.

Use Paused to pause and Stop to stop. Expand stretches frames to Control size without a separate aspect-preservation mode: provide an appropriate aspect ratio through layout. Finished means natural completion without Loop rather than manual Stop.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

VideoStreamPlayerConstructor
# VideoStreamPlayer
C#
public VideoStreamPlayer();

Creates a UI video player. Play requires tree membership and a valid Stream providing a decoder.

Properties12

AudioTrackProperty
# AudioTrack
C#
public int AudioTrack { get; set; }

Audio-track index, normally zero-based. Passed to the shared Stream and current playback; switching support depends on the decoder. Does not create a track or choose an audio bus.

AutoplayProperty
# Autoplay
C#
public bool Autoplay { get; set; }

Starts on tree entry when Stream is already assigned and this is not the editor. Enabling it after entry does not itself call Play; assigning Stream later is not another tree entry.

BufferingMsecProperty
# BufferingMsec
C#
public int BufferingMsec { get; set; }

Audio-buffering duration in milliseconds for playback setup. The setter stores the value without rebuilding an existing buffer: configure before Stream or reassign the stream. Neither movie duration nor a network video buffer.

BusProperty
# Bus
C#
public StringName Bus { get; set; }

Existing audio-bus name. The getter falls back to Master when the named bus is missing. Assignment neither creates a bus nor chooses a video track.

ExpandProperty
# Expand
C#
public bool Expand { get; set; }

true stretches frames to current Size and removes the video-resolution minimum size. false draws at natural frame size. Stretching does not automatically preserve aspect ratio.

LoopProperty
# Loop
C#
public bool Loop { get; set; }

Calls Play again on natural completion instead of Finished. The playback implementation supplies restart behavior. Does not turn manual Stop into a completion event.

PausedProperty
# Paused
C#
public bool Paused { get; set; }

User pause state; false resumes processing when the tree allows it. Not equivalent to IsPlaying. Tree pause/suspension may temporarily pause decoding without changing this user flag.

SpeedScaleProperty
# SpeedScale
C#
public float SpeedScale { get; set; }

Nonnegative video/audio progression multiplier; one is normal speed, negative values are rejected. Zero does not set Paused; use Paused for explicit pause state. Applies together with engine time scaling.

StreamProperty
# Stream
C#
public VideoStream Stream { get; set; }

Video resource. Assignment stops the old stream, creates a new playback and updates the texture/audio buffer. null removes it. Players may share a resource while using separate playback objects; the resource itself remains shared.

StreamPositionProperty
# StreamPosition
C#
public double StreamPosition { get; set; }

Position in seconds. The setter flushes queued audio and delegates seeking to the decoder; does not validate bounds or guarantee an exact frame. With known duration use zero <= position < length; Theora ignores positions at or beyond duration. The getter returns zero without playback.

VolumeProperty
# Volume
C#
public float Volume { get; set; }

Linear audio multiplier: zero is silence, one is the original level, values above one amplify. Use nonnegative values. Does not affect frame brightness or replace bus volume.

VolumeDbProperty
# VolumeDb
C#
public float VolumeDb { get; set; }

The same volume in decibels: zero dB corresponds to Volume one. Below -79 dB sets silence; the getter returns -80 for silence. Not an independent second volume control.

Methods30

GetAudioTrackint
# GetAudioTrack
C#
public int GetAudioTrack();

Audio-track index, normally zero-based. Passed to the shared Stream and current playback; switching support depends on the decoder. Does not create a track or choose an audio bus.

Returns int

Audio-track index, normally zero-based. Passed to the shared Stream and current playback; switching support depends on the decoder. Does not create a track or choose an audio bus.

GetBufferingMsecint
# GetBufferingMsec
C#
public int GetBufferingMsec();

Audio-buffering duration in milliseconds for playback setup. The setter stores the value without rebuilding an existing buffer: configure before Stream or reassign the stream. Neither movie duration nor a network video buffer.

Returns int

Audio-buffering duration in milliseconds for playback setup. The setter stores the value without rebuilding an existing buffer: configure before Stream or reassign the stream. Neither movie duration nor a network video buffer.

GetBusStringName
# GetBus
C#
public StringName GetBus();

Existing audio-bus name. The getter falls back to Master when the named bus is missing. Assignment neither creates a bus nor chooses a video track.

Returns StringName

Existing audio-bus name. The getter falls back to Master when the named bus is missing. Assignment neither creates a bus nor chooses a video track.

GetSpeedScalefloat
# GetSpeedScale
C#
public float GetSpeedScale();

Nonnegative video/audio progression multiplier; one is normal speed, negative values are rejected. Zero does not set Paused; use Paused for explicit pause state. Applies together with engine time scaling.

Returns float

Nonnegative video/audio progression multiplier; one is normal speed, negative values are rejected. Zero does not set Paused; use Paused for explicit pause state. Applies together with engine time scaling.

GetStreamVideoStream
# GetStream
C#
public VideoStream GetStream();

Video resource. Assignment stops the old stream, creates a new playback and updates the texture/audio buffer. null removes it. Players may share a resource while using separate playback objects; the resource itself remains shared.

Returns VideoStream

Video resource. Assignment stops the old stream, creates a new playback and updates the texture/audio buffer. null removes it. Players may share a resource while using separate playback objects; the resource itself remains shared.

GetStreamLengthdouble
# GetStreamLength
C#
public double GetStreamLength();

Duration in seconds from the decoder, zero without playback or when the implementation has no duration information. Zero does not prove an empty file.

Returns double

Duration in seconds from the decoder, zero without playback or when the implementation has no duration information. Zero does not prove an empty file.

GetStreamNamestring
# GetStreamName
C#
public string GetStreamName();

Stream resource name, not necessarily its filename. Returns the service string <No Stream> without a resource. Use the resource File property for its path.

Returns string

Stream resource name, not necessarily its filename. Returns the service string <No Stream> without a resource. Use the resource File property for its path.

GetStreamPositiondouble
# GetStreamPosition
C#
public double GetStreamPosition();

Position in seconds. The setter flushes queued audio and delegates seeking to the decoder; does not validate bounds or guarantee an exact frame. With known duration use zero <= position < length; Theora ignores positions at or beyond duration. The getter returns zero without playback.

Returns double

Position in seconds. The setter flushes queued audio and delegates seeking to the decoder; does not validate bounds or guarantee an exact frame. With known duration use zero <= position < length; Theora ignores positions at or beyond duration. The getter returns zero without playback.

GetVideoTextureTexture2D
# GetVideoTexture
C#
public Texture2D GetVideoTexture();

Returns the decoder’s shared current texture, or null without playback. May change as decoding proceeds rather than being a frame snapshot. Do not free it as an owned server resource.

Returns Texture2D

Returns the decoder’s shared current texture, or null without playback. May change as decoding proceeds rather than being a frame snapshot. Do not free it as an owned server resource.

GetVolumefloat
# GetVolume
C#
public float GetVolume();

Linear audio multiplier: zero is silence, one is the original level, values above one amplify. Use nonnegative values. Does not affect frame brightness or replace bus volume.

Returns float

Linear audio multiplier: zero is silence, one is the original level, values above one amplify. Use nonnegative values. Does not affect frame brightness or replace bus volume.

GetVolumeDbfloat
# GetVolumeDb
C#
public float GetVolumeDb();

The same volume in decibels: zero dB corresponds to Volume one. Below -79 dB sets silence; the getter returns -80 for silence. Not an independent second volume control.

Returns float

The same volume in decibels: zero dB corresponds to Volume one. Below -79 dB sets silence; the getter returns -80 for silence. Not an independent second volume control.

HasAutoplaybool
# HasAutoplay
C#
public bool HasAutoplay();

Starts on tree entry when Stream is already assigned and this is not the editor. Enabling it after entry does not itself call Play; assigning Stream later is not another tree entry.

Returns bool

Starts on tree entry when Stream is already assigned and this is not the editor. Enabling it after entry does not itself call Play; assigning Stream later is not another tree entry.

HasExpandbool
# HasExpand
C#
public bool HasExpand();

true stretches frames to current Size and removes the video-resolution minimum size. false draws at natural frame size. Stretching does not automatically preserve aspect ratio.

Returns bool

true stretches frames to current Size and removes the video-resolution minimum size. false draws at natural frame size. Stretching does not automatically preserve aspect ratio.

HasLoopbool
# HasLoop
C#
public bool HasLoop();

Calls Play again on natural completion instead of Finished. The playback implementation supplies restart behavior. Does not turn manual Stop into a completion event.

Returns bool

Calls Play again on natural completion instead of Finished. The playback implementation supplies restart behavior. Does not turn manual Stop into a completion event.

IsPausedbool
# IsPaused
C#
public bool IsPaused();

User pause state; false resumes processing when the tree allows it. Not equivalent to IsPlaying. Tree pause/suspension may temporarily pause decoding without changing this user flag.

Returns bool

User pause state; false resumes processing when the tree allows it. Not equivalent to IsPlaying. Tree pause/suspension may temporarily pause decoding without changing this user flag.

IsPlayingbool
# IsPlaying
C#
public bool IsPlaying();

Returns playback state or false without one. Does not test audible sound or a newly drawn frame; a paused decoder may still report playing.

Returns bool

Returns playback state or false without one. Does not test audible sound or a newly drawn frame; a paused decoder may still report playing.

Playvoid
# Play
C#
public void Play();

Starts the current decoder; requires the control in the tree and a prepared Stream. Repeated Play does not guarantee restarting from the beginning for every implementation. Resume a pause with Paused false.

SetAudioTrackvoid
# SetAudioTrack
C#
public void SetAudioTrack(int track);

Audio-track index, normally zero-based. Passed to the shared Stream and current playback; switching support depends on the decoder. Does not create a track or choose an audio bus.

Parameters
NameTypeDefault
trackint—
track

Format-specific audio-track index, normally zero-based.

SetAutoplayvoid
# SetAutoplay
C#
public void SetAutoplay(bool enabled);

Starts on tree entry when Stream is already assigned and this is not the editor. Enabling it after entry does not itself call Play; assigning Stream later is not another tree entry.

Parameters
NameTypeDefault
enabledbool—
enabled

Start on tree entry when Stream is already assigned.

SetBufferingMsecvoid
# SetBufferingMsec
C#
public void SetBufferingMsec(int msec);

Audio-buffering duration in milliseconds for playback setup. The setter stores the value without rebuilding an existing buffer: configure before Stream or reassign the stream. Neither movie duration nor a network video buffer.

Parameters
NameTypeDefault
msecint—
msec

Nonnegative audio-buffer duration in milliseconds.

SetBusvoid
# SetBus
C#
public void SetBus(StringName bus);

Existing audio-bus name. The getter falls back to Master when the named bus is missing. Assignment neither creates a bus nor chooses a video track.

Parameters
NameTypeDefault
busStringName—
bus

Existing audio-bus name.

SetExpandvoid
# SetExpand
C#
public void SetExpand(bool enable);

true stretches frames to current Size and removes the video-resolution minimum size. false draws at natural frame size. Stretching does not automatically preserve aspect ratio.

Parameters
NameTypeDefault
enablebool—
enable

Stretch frames to Control size.

SetLoopvoid
# SetLoop
C#
public void SetLoop(bool loop);

Calls Play again on natural completion instead of Finished. The playback implementation supplies restart behavior. Does not turn manual Stop into a completion event.

Parameters
NameTypeDefault
loopbool—
loop

Repeat naturally completed playback.

SetPausedvoid
# SetPaused
C#
public void SetPaused(bool paused);

User pause state; false resumes processing when the tree allows it. Not equivalent to IsPlaying. Tree pause/suspension may temporarily pause decoding without changing this user flag.

Parameters
NameTypeDefault
pausedbool—
paused

Pause advancement without ending the stream.

SetSpeedScalevoid
# SetSpeedScale
C#
public void SetSpeedScale(float speedScale);

Nonnegative video/audio progression multiplier; one is normal speed, negative values are rejected. Zero does not set Paused; use Paused for explicit pause state. Applies together with engine time scaling.

Parameters
NameTypeDefault
speedScalefloat—
speedScale

Nonnegative speed multiplier; one is normal speed.

SetStreamvoid
# SetStream
C#
public void SetStream(VideoStream stream);

Video resource. Assignment stops the old stream, creates a new playback and updates the texture/audio buffer. null removes it. Players may share a resource while using separate playback objects; the resource itself remains shared.

Parameters
NameTypeDefault
streamVideoStream—
stream

VideoStream resource providing a decoder, or null to remove it.

SetStreamPositionvoid
# SetStreamPosition
C#
public void SetStreamPosition(double position);

Position in seconds. The setter flushes queued audio and delegates seeking to the decoder; does not validate bounds or guarantee an exact frame. With known duration use zero <= position < length; Theora ignores positions at or beyond duration. The getter returns zero without playback.

Parameters
NameTypeDefault
positiondouble—
position

Desired position in seconds; the decoder determines validity.

SetVolumevoid
# SetVolume
C#
public void SetVolume(float volume);

Linear audio multiplier: zero is silence, one is the original level, values above one amplify. Use nonnegative values. Does not affect frame brightness or replace bus volume.

Parameters
NameTypeDefault
volumefloat—
volume

Nonnegative linear audio multiplier.

SetVolumeDbvoid
# SetVolumeDb
C#
public void SetVolumeDb(float db);

The same volume in decibels: zero dB corresponds to Volume one. Below -79 dB sets silence; the getter returns -80 for silence. Not an independent second volume control.

Parameters
NameTypeDefault
dbfloat—
db

Level in dB; below -79 sets silence.

Stopvoid
# Stop
C#
public void Stop();

Stops playback and flushes queued audio. Does not emit Finished; position reset depends on the decoder, with Theora seeking to the start. Does nothing outside the tree.

Signals and events1

FinishedEvent
# Finished
C#
public event Action Finished;

Natural completion of the current playback with Loop disabled. Not emitted by manual Stop; does not mean the player/resource was deleted.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.