SEmbeddedVideo
Index
Functions Index
| Function Name |
|---|
| void OnStateChange (Closure e) |
| void Play () |
| void Stop () |
| void Pause () |
| void Resume () |
| void SynchorizeUrl () |
| void ClearRenderTexture () |
Properties Index
| Property Name |
|---|
SEmbeddedVideoState State get |
string URL get set |
SAudioSource AudioSource get set |
SResource OutputTexture get |
SResource Texture get |
double Time get set |
long Position get |
string UniqueName get |
double VideoLength get |
bool Loop get set |
int FrameCount get |
bool IsPlaying get |
SGameObject GameObject get |
Functions
OnStateChange
void OnStateChange (Closure e)
Function Description
| Parameter | Type | Description |
|---|---|---|
- Lua
function stateChangeFunction(EmbeddedVideo, oldState, newState)
--what happens on state change
end
Space.Host.ExecutingObject.EmbeddedVideo.OnStageChange(stateChangeFunction)
- Lua
--get embedded video component on your video player
video = Space.Scene.Find("VidepPlayer").EmbeddedVideo
function GetClosure()
return function (a,b,c)
log(a.URL..b..c)
end
end
video.OnStateChange(GetClosure())
video.Pause()
Play
void Play ()
If URL is set, plays the video
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.Play()
Stop
void Stop ()
Stops the playback
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.Stop()
Pause
void Pause ()
Pauses currently played video
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.Pause()
Resume
void Resume ()
If the video is currently paused, it will resume playback
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.Resume()
SynchorizeUrl
void SynchorizeUrl ()
Synchorize current video URL
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.SynchorizeUrl()
ClearRenderTexture
void ClearRenderTexture ()
Clears the Render Texture
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.ClearRenderTexture()
Properties
State
SEmbeddedVideoState State get
The state player is currently in. You can track state changes through StateChangeEvent.
- Lua
CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State
URL
string URL get set
Current URL set for this Player.
- Lua
CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL
AudioSource
SAudioSource AudioSource get set
Current AudioSource
- Lua
CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource
OutputTexture
SResource OutputTexture get
Property Description
- Lua
OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture
Texture
SResource Texture get
Texture which the player uses to display the video.
- Lua
Texture = Space.Host.ExecutingObject.EmbeddedVideo.Texture
Time
double Time get set
Current player time. Can be set to move the 'playhead' to the specific position.
- Lua
Time = Space.Host.ExecutingObject.EmbeddedVideo.Time
Position
long Position get
Current Video Frame Position
- Lua
Position = Space.Host.ExecutingObject.EmbeddedVideo.Position
UniqueName
string UniqueName get
Property Description
- Lua
UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName
VideoLength
double VideoLength get
Get the length of the video
- Lua
VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength
Loop
bool Loop get set
Whether video is set to loop or not
- Lua
Space.Host.ExecutingObject.EmbeddedVideo.Loop = true
FrameCount
int FrameCount get
Returns the frame count of the video
- Lua
FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount
IsPlaying
bool IsPlaying get
Returns whether the video is playing or not
- Lua
IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying
GameObject
SGameObject GameObject get
Property Description
- Lua
theGameObject = Space.Host.ExecutingObject.EmbeddedVideo.GameObject