Api Sandbox VideoPlayer
class

VideoPlayer

public sealed class VideoPlayer

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

Constructors

VideoPlayer()

Properties

Name Type Description
OnLoaded Action Video successfully loaded.
OnAudioReady Action Event that is invoked when the audio stream is created and ready to use.
OnFinished Action Video finished playing.
OnRepeated Action Video started playing again after looping.
OnTextureData TextureChangedDelegate If this event is set, texture data will be provided instead of rendering to the texture.
Repeat Boolean Sets whether the video should loop when it reaches the end.
Duration Single Gets the total duration of the video in seconds.
PlaybackTime Single Gets the current playback time in seconds.
SampleRate Int32 Audio sample rate.
Channels Int32 Number of audio channels.
HasAudio Boolean Does the loaded video have audio?
IsPaused Boolean Has the video been paused?
Texture Texture Texture of the video frame.
Width Int32 Width of the video.
Height Int32 Height of the video.
Audio AudioAccessor Access audio properties for this video playback.
Muted Boolean The video is muted

Methods

virtual Void Dispose()
Void Play(String url)

Plays a video file from a URL. If there's already a video playing, it will stop.

Void Play(BaseFileSystem filesystem, String path)

Plays a video file from a relative path. If there's already a video playing, it will stop.

Void Resume()

Resumes video playback.

Void Stop()

Stops video playback.

Void Pause()

Pauses video playback.

Void TogglePause()

Toggle video playback

Void Seek(Single time)

Sets the playback position to a specified time in the video, given in seconds.

Void Present()

Present a video frame.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.VideoPlayer