All pages
Powered by GitBook
1 of 1

Loading...

SEmbeddedVideo

Index

Functions Index

Function Name

Properties Index

Property Name

Functions

OnStateChange

void OnStateChange (Closure e)

Function Description

Parameter
Type
Description

Play

void Play ()

If URL is set, plays the video

Stop

void Stop ()

Stops the playback

Pause

void Pause ()

Pauses currently played video

Resume

void Resume ()

If the video is currently paused, it will resume playback

SynchorizeUrl

void SynchorizeUrl ()

Synchorize current video URL

ClearRenderTexture

void ClearRenderTexture ()

Clears the Render Texture

Properties

State

State get

The state player is currently in. You can track state changes through StateChangeEvent.

URL

string URL get set

Current URL set for this Player.

AudioSource

AudioSource get set

Current AudioSource

OutputTexture

OutputTexture get

Property Description

Texture

Texture get

Texture which the player uses to display the video.

Time

double Time get set

Current player time. Can be set to move the 'playhead' to the specific position.

Position

long Position get

Current Video Frame Position

UniqueName

string UniqueName get

Property Description

VideoLength

double VideoLength get

Get the length of the video

Loop

bool Loop get set

Whether video is set to loop or not

FrameCount

int FrameCount get

Returns the frame count of the video

IsPlaying

bool IsPlaying get

Returns whether the video is playing or not

GameObject

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

SEmbeddedVideoState
SAudioSource
SResource
SResource
SGameObject

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.State
CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL
CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource
OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture
 Texture = Space.Host.ExecutingObject.EmbeddedVideo.Texture
Time = Space.Host.ExecutingObject.EmbeddedVideo.Time
Position = Space.Host.ExecutingObject.EmbeddedVideo.Position
UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName
VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength
 Space.Host.ExecutingObject.EmbeddedVideo.Loop  = true
FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount
IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying
theGameObject = Space.Host.ExecutingObject.EmbeddedVideo.GameObject
Loop
FrameCount
IsPlaying
GameObject