s&box docs

public sealed class Sandbox.VideoPlayer

Enables video playback and access to the video texture and audio.

Broader workflow and conceptual references connected to this API.

Constructors

Showing 1 constructors

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

Properties

Showing 17 properties

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 int Sandbox.VideoPlayer.Width { get; set; }

Width of the video.

Metadata

FieldValue
NamespaceSandbox
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.VideoPlayer

On this page

Constructorspublic VideoPlayer()Methodspublic virtual sealed System.Void Dispose()public System.Void Pause()public System.Void Play(Sandbox.BaseFileSystem filesystem, System.String path)public System.Void Play(System.String url)public System.Void Present()public System.Void Resume()public System.Void Seek(System.Single time)public System.Void Stop()public System.Void TogglePause()Propertiespublic Sandbox.VideoPlayer.AudioAccessor Sandbox.VideoPlayer.Audio { get; set; }public System.Int32 Sandbox.VideoPlayer.Channels { get; set; }public System.Single Sandbox.VideoPlayer.Duration { get; set; }public System.Boolean Sandbox.VideoPlayer.HasAudio { get; set; }public System.Int32 Sandbox.VideoPlayer.Height { get; set; }public System.Boolean Sandbox.VideoPlayer.IsPaused { get; set; }public System.Boolean Sandbox.VideoPlayer.Muted { get; set; }public System.Action Sandbox.VideoPlayer.OnAudioReady { get; set; }public System.Action Sandbox.VideoPlayer.OnFinished { get; set; }public System.Action Sandbox.VideoPlayer.OnLoaded { get; set; }public System.Action Sandbox.VideoPlayer.OnRepeated { get; set; }public Sandbox.VideoPlayer.TextureChangedDelegate Sandbox.VideoPlayer.OnTextureData { get; set; }public System.Single Sandbox.VideoPlayer.PlaybackTime { get; set; }public System.Boolean Sandbox.VideoPlayer.Repeat { get; set; }public System.Int32 Sandbox.VideoPlayer.SampleRate { get; set; }public Sandbox.Texture Sandbox.VideoPlayer.Texture { get; set; }public System.Int32 Sandbox.VideoPlayer.Width { get; set; }Metadata