Breakroom is now Sinewave Campus. Book a meeting

SEmbeddedVideo

ClientComposants
Dans cette classeOnStateChange
  1. Fonctions
  2. OnStateChange
  3. Play
  4. Stop
  5. Pause
  6. Resume
  7. SynchorizeUrl
  8. ClearRenderTexture
  9. Propriétés
  10. State
  11. URL
  12. AudioSource
  13. OutputTexture
  14. Texture
  15. Time
  16. Position
  17. UniqueName
  18. VideoLength
  19. Loop
  20. FrameCount
  21. IsPlaying
  22. GameObject
Membres 20
FonctionOnStateChange–
FonctionPlayIf URL is set, plays the video
FonctionStopStops the playback
FonctionPausePauses currently played video
FonctionResumeIf the video is currently paused, it will resume playback
FonctionSynchorizeUrlSynchorize current video URL
FonctionClearRenderTextureClears the Render Texture
PropriétéStateThe state player is currently in.
PropriétéURLCurrent URL set for this Player.
PropriétéAudioSourceCurrent AudioSource
PropriétéOutputTexture–
PropriétéTextureTexture which the player uses to display the video.
PropriétéTimeCurrent player time.
PropriétéPositionCurrent Video Frame Position
PropriétéUniqueName–
PropriétéVideoLengthGet the length of the video
PropriétéLoopWhether video is set to loop or not
PropriétéFrameCountReturns the frame count of the video
PropriétéIsPlayingReturns whether the video is playing or not
PropriétéGameObject–

Fonctions​

OnStateChange​

void OnStateChange(Closure e)

Paramètres

NomTypeValeur par défaut
eClosure–

Valeurs de retour

void

Exemple

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

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.Play()

Stop​

void Stop()

Stops the playback

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.Stop()

Pause​

void Pause()

Pauses currently played video

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.Pause()

Resume​

void Resume()

If the video is currently paused, it will resume playback

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.Resume()

SynchorizeUrl​

void SynchorizeUrl()

Synchorize current video URL

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.SynchorizeUrl()

ClearRenderTexture​

void ClearRenderTexture()

Clears the Render Texture

Valeurs de retour

void

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.ClearRenderTexture()

Propriétés​

StateLecture seule​

SEmbeddedVideoState State {get; }

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

Exemple

Lua
CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State

URL​

string URL {get; set; }

Current URL set for this Player.

Exemple

Lua
CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL

AudioSource​

SAudioSource AudioSource {get; set; }

Current AudioSource

Exemple

Lua
CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource

OutputTextureLecture seule​

SResource OutputTexture {get; }

Exemple

Lua
OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture

TextureLecture seule​

SResource Texture {get; }

Texture which the player uses to display the video.

Exemple

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.

Exemple

Lua
Time = Space.Host.ExecutingObject.EmbeddedVideo.Time

PositionLecture seule​

long Position {get; }

Current Video Frame Position

Exemple

Lua
Position = Space.Host.ExecutingObject.EmbeddedVideo.Position

UniqueNameLecture seule​

string UniqueName {get; }

Exemple

Lua
UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName

VideoLengthLecture seule​

double VideoLength {get; }

Get the length of the video

Exemple

Lua
VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength

Loop​

bool Loop {get; set; }

Whether video is set to loop or not

Exemple

Lua
Space.Host.ExecutingObject.EmbeddedVideo.Loop = true

FrameCountLecture seule​

int FrameCount {get; }

Returns the frame count of the video

Exemple

Lua
FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount

IsPlayingLecture seule​

bool IsPlaying {get; }

Returns whether the video is playing or not

Exemple

Lua
IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying

GameObjectLecture seule​

SGameObject GameObject {get; }

Exemple

Lua
theGameObject = Space.Host.ExecutingObject.EmbeddedVideo.GameObject