SEmbeddedVideo
Dans cette classeOnStateChange
| Fonction | OnStateChange | – |
| Fonction | Play | If URL is set, plays the video |
| Fonction | Stop | Stops the playback |
| Fonction | Pause | Pauses currently played video |
| Fonction | Resume | If the video is currently paused, it will resume playback |
| Fonction | SynchorizeUrl | Synchorize current video URL |
| Fonction | ClearRenderTexture | Clears the Render Texture |
| Propriété | State | The state player is currently in. |
| Propriété | URL | Current URL set for this Player. |
| Propriété | AudioSource | Current AudioSource |
| Propriété | OutputTexture | – |
| Propriété | Texture | Texture which the player uses to display the video. |
| Propriété | Time | Current player time. |
| Propriété | Position | Current Video Frame Position |
| Propriété | UniqueName | – |
| Propriété | VideoLength | Get the length of the video |
| Propriété | Loop | Whether video is set to loop or not |
| Propriété | FrameCount | Returns the frame count of the video |
| Propriété | IsPlaying | Returns whether the video is playing or not |
| Propriété | GameObject | – |
Fonctions
OnStateChange
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| e | Closure | – |
Valeurs de retour
void
Exemple
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()
Play
If URL is set, plays the video
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.Play()
Stop
Stops the playback
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.Stop()
Pause
Pauses currently played video
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.Pause()
Resume
If the video is currently paused, it will resume playback
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.Resume()
SynchorizeUrl
Synchorize current video URL
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.SynchorizeUrl()
ClearRenderTexture
Clears the Render Texture
Valeurs de retour
void
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.ClearRenderTexture()
Propriétés
StateLecture seule
The state player is currently in. You can track state changes through StateChangeEvent.
Exemple
CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State
URL
Current URL set for this Player.
Exemple
CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL
AudioSource
Current AudioSource
Exemple
CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource
OutputTextureLecture seule
Exemple
OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture
TextureLecture seule
Texture which the player uses to display the video.
Exemple
Texture = Space.Host.ExecutingObject.EmbeddedVideo.Texture
Time
Current player time. Can be set to move the 'playhead' to the specific position.
Exemple
Time = Space.Host.ExecutingObject.EmbeddedVideo.Time
PositionLecture seule
Current Video Frame Position
Exemple
Position = Space.Host.ExecutingObject.EmbeddedVideo.Position
UniqueNameLecture seule
Exemple
UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName
VideoLengthLecture seule
Get the length of the video
Exemple
VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength
Loop
Whether video is set to loop or not
Exemple
Space.Host.ExecutingObject.EmbeddedVideo.Loop = true
FrameCountLecture seule
Returns the frame count of the video
Exemple
FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount
IsPlayingLecture seule
Returns whether the video is playing or not
Exemple
IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying
GameObjectLecture seule
Exemple
theGameObject = Space.Host.ExecutingObject.EmbeddedVideo.GameObject



