wiki.sine.space | sinespace

Difference between revisions of "Scripting/SEmbeddedVideo"

From wiki.sine.space
Jump to: navigation, search
m
m
Line 42: Line 42:
  
  
{{ScriptFunction|void|State|{ get;}|The state player is currently in. You can track state changes through StateChangeEvent.|5= <pre> CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State</pre>}}
+
{{ScriptFunction|EmbeddedVideoBaseInternal.EmbeddedVideoState|State|{ get;}|The state player is currently in. You can track state changes through StateChangeEvent.|5= <pre> CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State</pre>}}
  
  
{{ScriptFunction|void|URL|{ get;set;}|Current URL set for this Player.|5= <pre>CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL</pre>}}
+
{{ScriptFunction|string|URL|{ get;set;}|Current URL set for this Player.|5= <pre>CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL</pre>}}
  
  
{{ScriptFunction|void|AudioSource|{ get;set;}|Current AudioSource|5= <pre>CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource</pre>}}
+
{{ScriptFunction|SAudioSource|AudioSource|{ get;set;}|Current AudioSource|5= <pre>CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource</pre>}}
  
  
{{ScriptFunction|void|OutputTexture|{ get;}||5= <pre>OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture</pre>}}
+
{{ScriptFunction|SResource|OutputTexture|{ get;}||5= <pre>OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture</pre>}}
  
  
{{ScriptFunction|void|Texture|{ get;}|Texture which the player uses to display the video.|5= <pre> Texture = Space.Host.ExecutingObject.EmbeddedVideo.Texture</pre>}}
+
{{ScriptFunction|SResource|Texture|{ get;}|Texture which the player uses to display the video.|5= <pre> Texture = Space.Host.ExecutingObject.EmbeddedVideo.Texture</pre>}}
  
  
{{ScriptFunction|void|Time|{ get;set;}|Current player time. Can be set to move the 'playhead' to the specific position.|5= <pre>Time = Space.Host.ExecutingObject.EmbeddedVideo.Time</pre>}}
+
{{ScriptFunction|double|Time|{ get;set;}|Current player time. Can be set to move the 'playhead' to the specific position.|5= <pre>Time = Space.Host.ExecutingObject.EmbeddedVideo.Time</pre>}}
  
  
{{ScriptFunction|void|Position|{ get;}|Current Video Frame Position|5= <pre>Position = Space.Host.ExecutingObject.EmbeddedVideo.Position</pre>}}
+
{{ScriptFunction|long|Position|{ get;}|Current Video Frame Position|5= <pre>Position = Space.Host.ExecutingObject.EmbeddedVideo.Position</pre>}}
  
  
{{ScriptFunction|void|UniqueName|{ get;}||5= <pre>UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName</pre>}}
+
{{ScriptFunction|string|UniqueName|{ get;}||5= <pre>UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName</pre>}}
  
  
{{ScriptFunction|void|VideoLength|{ get;}|Get the length of the video|5= <pre>VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength</pre>}}
+
{{ScriptFunction|double|VideoLength|{ get;}|Get the length of the video|5= <pre>VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength</pre>}}
  
  
{{ScriptFunction|void|Loop|{ get;set;}|Whether video is set to loop or not|5= <pre> Space.Host.ExecutingObject.EmbeddedVideo.Loop  = true</pre>}}
+
{{ScriptFunction|bool|Loop|{ get;set;}|Whether video is set to loop or not|5= <pre> Space.Host.ExecutingObject.EmbeddedVideo.Loop  = true</pre>}}
  
  
{{ScriptFunction|void|FrameCount|{ get;}|Returns the frame count of the video|5= <pre>FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount</pre>}}
+
{{ScriptFunction|int|FrameCount|{ get;}|Returns the frame count of the video|5= <pre>FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount</pre>}}
  
  
{{ScriptFunction|void|IsPlaying|{ get;}|Returns whether the video is playing or not|5= <pre>IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying</pre>}}
+
{{ScriptFunction|bool|IsPlaying|{ get;}|Returns whether the video is playing or not|5= <pre>IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying</pre>}}
  
  

Revision as of 08:29, 11 June 2021

Members

OnStateChange

void OnStateChange ()

Binds a function to the OnStateChange event which fires every time player changes its state


function sc()
Space.Log("State Changed")
end

Space.Host.ExecutingObject.EmbeddedVideo.OnStateChange(sc)


Play

void Play ()

If URL is set, plays the video


Space.Host.ExecutingObject.EmbeddedVideo.Play()


Stop

void Stop ()

Stops the playback

Space.Host.ExecutingObject.EmbeddedVideo.Stop()


Pause

void Pause ()

Pauses currently played video

Space.Host.ExecutingObject.EmbeddedVideo.Pause()


Resume

void Resume ()

If the video is currently paused, it will resume playback

Space.Host.ExecutingObject.EmbeddedVideo.Resume()


SynchorizeUrl

void SynchorizeUrl ()

Synchorize current video url

Space.Host.ExecutingObject.EmbeddedVideo.SynchorizeUrl()


ClearRenderTexture

void ClearRenderTexture ()

Clears the Render Texture

Space.Host.ExecutingObject.EmbeddedVideo.ClearRenderTexture()




Properties

State

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

 CurrentVideoState = Space.Host.ExecutingObject.EmbeddedVideo.State



URL

string URL { get;set;}

Current URL set for this Player.

CurrentURL = Space.Host.ExecutingObject.EmbeddedVideo.URL



AudioSource

SAudioSource AudioSource { get;set;}

Current AudioSource

CurrentAudioSource = Space.Host.ExecutingObject.EmbeddedVideo.AudioSource



OutputTexture

SResource OutputTexture { get;}


OutputTexture = Space.Host.ExecutingObject.EmbeddedVideo.OutputTexture



Texture

SResource Texture { get;}

Texture which the player uses to display the video.

 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.

Time = Space.Host.ExecutingObject.EmbeddedVideo.Time



Position

long Position { get;}

Current Video Frame Position

Position = Space.Host.ExecutingObject.EmbeddedVideo.Position



UniqueName

string UniqueName { get;}


UniqueName = Space.Host.ExecutingObject.EmbeddedVideo.UniqueName



VideoLength

double VideoLength { get;}

Get the length of the video

VideoLength = Space.Host.ExecutingObject.EmbeddedVideo.VideoLength



Loop

bool Loop { get;set;}

Whether video is set to loop or not

 Space.Host.ExecutingObject.EmbeddedVideo.Loop  = true



FrameCount

int FrameCount { get;}

Returns the frame count of the video

FrameCount = Space.Host.ExecutingObject.EmbeddedVideo.FrameCount



IsPlaying

bool IsPlaying { get;}

Returns whether the video is playing or not

IsPlaying = Space.Host.ExecutingObject.EmbeddedVideo.IsPlaying