public sealed class Sandbox.VideoPlayer
Enables video playback and access to the video texture and audio.
Related Guides
Broader workflow and conceptual references connected to this API.
Constructors
Showing 1 constructors
public VideoPlayer()
No results match this filter.
Methods
Showing 9 methods
public virtual sealed void Dispose()
public void Pause()
Pauses video playback.
public void Present()
Present a video frame.
public void Resume()
Resumes video playback.
public void Seek(float time)
Sets the playback position to a specified time in the video, given in seconds.
public void Stop()
Stops video playback.
public void TogglePause()
Toggle video playback
No results match this filter.
Properties
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.
public float Sandbox.VideoPlayer.Duration { get; set; }
Gets the total duration of the video in seconds.
public bool Sandbox.VideoPlayer.HasAudio { get; set; }
Does the loaded video have audio?
public int Sandbox.VideoPlayer.Height { get; set; }
Height of the video.
public bool Sandbox.VideoPlayer.IsPaused { get; set; }
Has the video been paused?
public bool Sandbox.VideoPlayer.Muted { get; set; }
The video is muted
public System.Action Sandbox.VideoPlayer.OnAudioReady { get; set; }
Event that is invoked when the audio stream is created and ready to use.
public System.Action Sandbox.VideoPlayer.OnFinished { get; set; }
Video finished playing.
public System.Action Sandbox.VideoPlayer.OnLoaded { get; set; }
Video successfully loaded.
public System.Action Sandbox.VideoPlayer.OnRepeated { get; set; }
Video started playing again after looping.
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.
public bool Sandbox.VideoPlayer.Repeat { get; set; }
Sets whether the video should loop when it reaches the end.
public int Sandbox.VideoPlayer.SampleRate { get; set; }
Audio sample rate.
public Sandbox.Texture Sandbox.VideoPlayer.Texture { get; set; }
Texture of the video frame.
public int Sandbox.VideoPlayer.Width { get; set; }
Width of the video.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.VideoPlayer |