Breakroom is now Sinewave Campus. Book a meeting

SEmbeddedVideo

العميلالمكونات
في هذا الصنفOnStateChange
  1. الدوال
  2. OnStateChange
  3. Play
  4. Stop
  5. Pause
  6. Resume
  7. SynchorizeUrl
  8. ClearRenderTexture
  9. الخصائص
  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
الأعضاء 20
دالةOnStateChange–
دالةPlayIf URL is set, plays the video
دالةStopStops the playback
دالةPausePauses currently played video
دالةResumeIf the video is currently paused, it will resume playback
دالةSynchorizeUrlSynchorize current video URL
دالةClearRenderTextureClears the Render Texture
خاصيةStateThe state player is currently in.
خاصيةURLCurrent URL set for this Player.
خاصيةAudioSourceCurrent AudioSource
خاصيةOutputTexture–
خاصيةTextureTexture which the player uses to display the video.
خاصيةTimeCurrent player time.
خاصيةPositionCurrent Video Frame Position
خاصيةUniqueName–
خاصيةVideoLengthGet the length of the video
خاصيةLoopWhether video is set to loop or not
خاصيةFrameCountReturns the frame count of the video
خاصيةIsPlayingReturns whether the video is playing or not
خاصيةGameObject–

الدوال​

OnStateChange​

void OnStateChange(Closure e)

المعاملات

الاسمالنوعالقيمة الافتراضية
eClosure–

القيم المرجعة

void

مثال

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

القيم المرجعة

void

مثال

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

Stop​

void Stop()

Stops the playback

القيم المرجعة

void

مثال

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

Pause​

void Pause()

Pauses currently played video

القيم المرجعة

void

مثال

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

Resume​

void Resume()

If the video is currently paused, it will resume playback

القيم المرجعة

void

مثال

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

SynchorizeUrl​

void SynchorizeUrl()

Synchorize current video URL

القيم المرجعة

void

مثال

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

ClearRenderTexture​

void ClearRenderTexture()

Clears the Render Texture

القيم المرجعة

void

مثال

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

الخصائص​

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; }

مثال

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; }

مثال

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; }

مثال

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