VideoPlayerclass
Enables video playback and access to the video texture and audio.
Constructors1
Showing 1 constructors
public VideoPlayer()
No results match this filter.
Methods9
Showing 9 methods
public virtual sealed void Dispose()
void—public void Pause()
Pauses video playback.
void—public void Present()
Present a video frame.
void—public void Resume()
Resumes video playback.
void—public void Seek(float time)
Sets the playback position to a specified time in the video, given in seconds.
| Parameter | Type | Description |
|---|---|---|
| time | float | — |
void—public void Stop()
Stops video playback.
void—public void TogglePause()
Toggle video playback
void—No results match this filter.
Properties17
Showing 17 properties
public Sandbox.VideoPlayer.AudioAccessor Sandbox.VideoPlayer.Audio { get; set; }
Access audio properties for this video playback.
public int Sandbox.VideoPlayer.Channels { get; set; }
Number of audio channels.
int—public float Sandbox.VideoPlayer.Duration { get; set; }
Gets the total duration of the video in seconds.
float—public bool Sandbox.VideoPlayer.HasAudio { get; set; }
Does the loaded video have audio?
bool—public int Sandbox.VideoPlayer.Height { get; set; }
Height of the video.
int—public bool Sandbox.VideoPlayer.IsPaused { get; set; }
Has the video been paused?
bool—public bool Sandbox.VideoPlayer.Muted { get; set; }
The video is muted
bool—public System.Action Sandbox.VideoPlayer.OnAudioReady { get; set; }
Event that is invoked when the audio stream is created and ready to use.
Action—public System.Action Sandbox.VideoPlayer.OnFinished { get; set; }
Video finished playing.
Action—public System.Action Sandbox.VideoPlayer.OnLoaded { get; set; }
Video successfully loaded.
Action—public System.Action Sandbox.VideoPlayer.OnRepeated { get; set; }
Video started playing again after looping.
Action—public Sandbox.VideoPlayer.TextureChangedDelegate Sandbox.VideoPlayer.OnTextureData { get; set; }
If this event is set, texture data will be provided instead of rendering to the texture.
public float Sandbox.VideoPlayer.PlaybackTime { get; set; }
Gets the current playback time in seconds.
float—public bool Sandbox.VideoPlayer.Repeat { get; set; }
Sets whether the video should loop when it reaches the end.
bool—public int Sandbox.VideoPlayer.SampleRate { get; set; }
Audio sample rate.
int—public Sandbox.Texture Sandbox.VideoPlayer.Texture { get; set; }
Texture of the video frame.
public int Sandbox.VideoPlayer.Width { get; set; }
Width of the video.
int—No results match this filter.