void OnStateChange (Closure e)
Function Description
void Play ()
If URL is set, plays the video
void Stop ()
Stops the playback
void Pause ()
Pauses currently played video
void Resume ()
If the video is currently paused, it will resume playback
void SynchorizeUrl ()
Synchorize current video URL
void ClearRenderTexture ()
Clears the Render Texture
State get
The state player is currently in. You can track state changes through StateChangeEvent.
string URL get set
Current URL set for this Player.
AudioSource get set
Current AudioSource
OutputTexture get
Property Description
Texture get
Texture which the player uses to display the video.
double Time get set
Current player time. Can be set to move the 'playhead' to the specific position.
long Position get
Current Video Frame Position
string UniqueName get
Property Description
double VideoLength get
Get the length of the video
bool Loop get set
Whether video is set to loop or not
int FrameCount get
Returns the frame count of the video
bool IsPlaying get
Returns whether the video is playing or not
GameObject get
Property Description
int get
bool get
SGameObject get
void OnStateChange (Closure e)
void Play ()
void Stop ()
void Pause ()
void Resume ()
void SynchorizeUrl ()
void ClearRenderTexture ()
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 get set
function stateChangeFunction(EmbeddedVideo, oldState, newState)
--what happens on state change
end
Space.Host.ExecutingObject.EmbeddedVideo.OnStageChange(stateChangeFunction)--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()Space.Host.ExecutingObject.EmbeddedVideo.Play()Space.Host.ExecutingObject.EmbeddedVideo.Stop()Space.Host.ExecutingObject.EmbeddedVideo.Pause()Space.Host.ExecutingObject.EmbeddedVideo.Resume()Space.Host.ExecutingObject.EmbeddedVideo.SynchorizeUrl()Space.Host.ExecutingObject.EmbeddedVideo.ClearRenderTexture() CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.StateCurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URLCurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSourceOutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture Texture = Space.Host.ExecutingObject.EmbeddedVideo.TextureTime = Space.Host.ExecutingObject.EmbeddedVideo.TimePosition = Space.Host.ExecutingObject.EmbeddedVideo.PositionUniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueNameVideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength Space.Host.ExecutingObject.EmbeddedVideo.Loop = trueFrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCountIsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlayingtheGameObject = Space.Host.ExecutingObject.EmbeddedVideo.GameObject