s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
VideoPlayer
chevron_left
Classes
class
VideoPlayer
search
Constructors
functions
VideoPlayer
Properties
data_object
Audio
data_object
Channels
data_object
Duration
data_object
HasAudio
data_object
Height
data_object
IsPaused
data_object
Muted
data_object
OnAudioReady
data_object
OnFinished
data_object
OnLoaded
data_object
OnRepeated
data_object
OnTextureData
data_object
PlaybackTime
data_object
Repeat
data_object
SampleRate
data_object
Texture
data_object
Width
Methods
functions
Dispose
functions
Pause
functions
Play
functions
Present
functions
Resume
functions
Seek
functions
Stop
functions
TogglePause
VideoPlayer
Enables video playback and access to the video texture and audio.
class
Sandbox
.
sealed
Sandbox.Engine
build
Constructors
1
VideoPlayer
(
)
data_object
Properties
17
Audio
AudioAccessor
Access audio properties for this video playback.
Channels
int
Number of audio channels.
Duration
float
Gets the total duration of the video in seconds.
HasAudio
bool
Does the loaded video have audio?
Height
int
Height of the video.
IsPaused
bool
Has the video been paused?
Muted
bool
The video is muted
OnAudioReady
Action
Event that is invoked when the audio stream is created and ready to use.
OnFinished
Action
Video finished playing.
OnLoaded
Action
Video successfully loaded.
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.
PlaybackTime
float
Gets the current playback time in seconds.
Repeat
bool
Sets whether the video should loop when it reaches the end.
SampleRate
int
Audio sample rate.
Texture
Texture
Texture of the video frame.
Width
int
Width of the video.
functions
Methods
8
Dispose
(
)
Pause
(
)
Pauses video playback.
Play
(
url
)
Plays a video file from a URL. If there's already a video playing, it will stop.
Present
(
)
Present a video frame.
Resume
(
)
Resumes video playback.
Seek
(
time
)
Sets the playback position to a specified time in the video, given in seconds.
Stop
(
)
Stops video playback.
TogglePause
(
)
Toggle video playback
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.