Swing  1.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Properties | List of all members
Swing.Spectator Class Reference
Inheritance diagram for Swing.Spectator:
Swing.ISpectator

Classes

class  GameObjects
 
class  Microphone
 
class  PlaybackCameras
 
class  RecEnvironments
 
class  Scene
 

Public Types

enum  States {
  Error = 0, Idle, Recording, Playback,
  Pause, Seeking, Broadcasting, Watching,
  Saving
}
 

Public Member Functions

bool StartReplay (GameObjectRecorder rec)
 
void EndReplay (GameObjectRecorder rec)
 
void RecordAudioEvent (AudioSource target, AudioRecorder.Event e)
 
void Initialize ()
 
bool Insert (Replay replay)
 
Replay Eject ()
 
bool Record ()
 
bool Play (bool pauseAtStart=false)
 
bool Watch ()
 
bool Broadcast (bool autoSave)
 
bool Reconnect ()
 
bool Stop ()
 
bool Pause ()
 
bool SeekToTime (float time)
 
bool SeekToRate (float rate)
 
bool Save (string fileName)
 
bool Upload ()
 
void SetCredential (Swing.SpectatorService.Credential credential)
 
void SetServerConfiguration (Swing.SpectatorService.Configuration config)
 
bool GetReplayList (ReplayStorage storage, int offset, int count)
 
bool GetBroadcastList (int offset, int count)
 
bool Load (string fileName)
 
bool Download (Guid replayId)
 

Static Public Member Functions

static ISpectator GetInstance ()
 

Properties

LoadReplayEvent OnLoad [get]
 
LoadReplayEvent OnDownload [get]
 
SaveReplayEvent OnSave [get]
 
SaveReplayEvent OnUpload [get]
 
BroadcastEvent OnBroadcast [get]
 
WatchEvent OnWatch [get]
 
PlayEvent OnPlay [get]
 
RecordEvent OnRecord [get]
 
ListReplaysEvent OnListReplay [get]
 
ListReplaysEvent OnListBroadcast [get]
 
Replay replay [get]
 
States state [get]
 
Timeline timeline [get]
 
GameObjects gameObjects [get]
 
Microphone microphone [get]
 
PlaybackCameras playbackCameras [get]
 
Scene scene [get]
 
- Properties inherited from Swing.ISpectator
LoadReplayEvent OnLoad [get]
 
LoadReplayEvent OnDownload [get]
 
SaveReplayEvent OnSave [get]
 
SaveReplayEvent OnUpload [get]
 
BroadcastEvent OnBroadcast [get]
 
WatchEvent OnWatch [get]
 
PlayEvent OnPlay [get]
 
RecordEvent OnRecord [get]
 
ListReplaysEvent OnListReplay [get]
 
ListReplaysEvent OnListBroadcast [get]
 
Replay replay [get]
 
Timeline timeline [get]
 
Spectator.Scene scene [get]
 
Spectator.GameObjects gameObjects [get]
 
Spectator.States state [get]
 
Spectator.Microphone microphone [get]
 
Spectator.PlaybackCameras playbackCameras [get]
 

Member Function Documentation

bool Swing.Spectator.Broadcast ( bool  autoSave)

Start to broadcast a gameplay

Returns
true if it can broadcast, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Download ( Guid  replayId)

Load replay from server

Implements Swing.ISpectator.

Replay Swing.Spectator.Eject ( )

Eject the CWR(current working replay)

It makes CWR as null.

Returns
the CWR

Implements Swing.ISpectator.

bool Swing.Spectator.GetBroadcastList ( int  offset,
int  count 
)

Get broadcast replay List from server

Implements Swing.ISpectator.

bool Swing.Spectator.GetReplayList ( ReplayStorage  storage,
int  offset,
int  count 
)

Get OnDeamnd replay list

Implements Swing.ISpectator.

void Swing.Spectator.Initialize ( )

Initialize the Spectator

Implements Swing.ISpectator.

bool Swing.Spectator.Insert ( Replay  replay)

Insert the replay

It sets the replay as the CWR(current working replay).

Parameters
replayreplay to use as the CWR
Returns
true if replay is inserted, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Load ( string  fileName)

Load replay from file

Implements Swing.ISpectator.

bool Swing.Spectator.Pause ( )

Pause the play operation

Returns
true if successful, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Play ( bool  pauseAtStart = false)

Start to playback the CWR(current working replay)

If the CWR is paused, this will resume it.

Parameters
pauseAtStart
callbackCalled when the playback reaches the end of the replay file or when an error occurred during playback
Returns
true if successful, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Reconnect ( )

Reconnect to Spectator service.

It try to reconnect to service, if connection is disconnected with spectator service in broadcast or watch

Returns
true if it can try to reconnect, false Broadcasting is finished or if it is stopped by user

Implements Swing.ISpectator.

bool Swing.Spectator.Record ( )

Start to record a gameplay

The gameplay is recorded into CWR(current working replay) that is inserted.

Returns
true if it can record, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Save ( string  fileName)

Save replay to local file

Implements Swing.ISpectator.

bool Swing.Spectator.SeekToRate ( float  ratio)

Seek the time by ratio in the CWR

Parameters
ratioratio about time [0~1]
Returns
true if successful, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.SeekToTime ( float  time)

Seek to the time in the CWR

Parameters
timeTime offset to seek
Returns
true if successful, false otherwise

Implements Swing.ISpectator.

void Swing.Spectator.SetCredential ( Swing.SpectatorService.Credential  credential)

Set Credentail to use the spectator service

Parameters
credentialcredential of user

Implements Swing.ISpectator.

void Swing.Spectator.SetServerConfiguration ( Swing.SpectatorService.Configuration  config)

Set configuration of server

The configuration is information of server about spectator service.

Parameters
configconfiguration of spectator service server

Implements Swing.ISpectator.

bool Swing.Spectator.Stop ( )

Stop the current operation

Returns
true if successful, false otherwise

Implements Swing.ISpectator.

bool Swing.Spectator.Upload ( )

Upload replay to server

Implements Swing.ISpectator.

bool Swing.Spectator.Watch ( )

Start to watch a broadcast that is represented as in CWR(current working replay)

Returns
true if it can watch, false otherwise

Implements Swing.ISpectator.


The documentation for this class was generated from the following files: