IFluxVideoPlayer
public interface IFluxVideoPlayer : IDisposableNamespace NodeWorld.SDK.Client.Flux.
One video player. Called on the main thread only; Update once per frame. States and errors use the values of the FL# API (NodeWorld.Flux.VideoState, VideoError).
Properties
Time
double Time { get; set; }Seconds; setting it seeks.
Duration
double Duration { get; }Seconds; 0 while unknown, and for a live stream.
IsLive
bool IsLive { get; }A live stream: no duration, no seeking.
Rate
float Rate { get; set; }Playback speed (1: normal).
State
int State { get; }Where the player is, a NodeWorld.Flux.VideoState value.
Error
int Error { get; }Why it failed, a NodeWorld.Flux.VideoError value.
Width
int Width { get; }Width of the picture, in pixels.
Height
int Height { get; }Height of the picture, in pixels.
Texture
Texture Texture { get; }The picture (sRGB, upright), null until the first one. It may be replaced when the size changes.
Methods
Load
void Load(string url, double start, bool play)Opens the media at url (a page of a video site is resolved by the client) from start seconds; plays when loaded if play.
Play
void Play()Plays the media.
Pause
void Pause()Pauses the media.
Stop
void Stop()Unloads the media.
SetAudioOutputs
void SetAudioOutputs(AudioSource[] sources, float[] gainsDb)These audio sources play the sound from now on, each with its gain (dB); their volume, mute and 3D settings apply after it.
Update
void Update()Moves the player on: called once per frame, on the main thread.
