Swing  1.0
Public Member Functions | Properties | List of all members
Swing.ISpectator Interface Reference
Inheritance diagram for Swing.ISpectator:
Swing.Spectator

Public Member Functions

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

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]
 
Timeline timeline [get]
 
Spectator.Scene scene [get]
 
Spectator.GameObjects gameObjects [get]
 
Spectator.States state [get]
 
Spectator.Microphone microphone [get]
 
Spectator.PlaybackCameras playbackCameras [get]
 

Detailed Description

Spectator Interface

This provides APIs to control the Swing spectator.

Member Function Documentation

bool Swing.ISpectator.Broadcast ( bool  autoSave)

Start to broadcast a gameplay

Returns
true if it can broadcast, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.Download ( Guid  replayId)

Download the replay from the local storage

Parameters
replayIdreplay identifier
Returns
true if it can do download operation, false otherwise

Implemented in Swing.Spectator.

Replay Swing.ISpectator.Eject ( )

Eject the CWR(current working replay)

It makes CWR as null.

Returns
the CWR

Implemented in Swing.Spectator.

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

List broadcasts

This returns a list of live broadcasts to the callback. A list is defined by the offset and count parameters. The total number of replays in the storage is returned in the callback.

Parameters
offsetStart offset of the page (zero-based, inclusive)
countNumber of broadcasts to list
callbackCalled when the broadcasts are listed or when an error occurred during listing up
Returns
true if successful, false otherwise

Implemented in Swing.Spectator.

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

List the replays in the storage

This returns a list of replays in the storage to the callback. A list is defined by the offset and count parameters. The total number of replays in the storage is returned in the callback.

Parameters
storageThe replays in this storage are listed.
offsetStart offset of the page (zero-based, inclusive)
countNumber of replays to list
Returns
true if successful, false otherwise

Implemented in Swing.Spectator.

void Swing.ISpectator.Initialize ( )

Initialize the Spectator

Implemented in Swing.Spectator.

bool Swing.ISpectator.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

Implemented in Swing.Spectator.

bool Swing.ISpectator.Load ( string  fileName)

Load the replay from the local storage

File path is PersistentDataPath + fileName.

Parameters
fileNamefileName to load
Returns
true if it can do load operation, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.Pause ( )

Pause the play operation

Returns
true if successful, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.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

Implemented in Swing.Spectator.

bool Swing.ISpectator.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

Implemented in Swing.Spectator.

bool Swing.ISpectator.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

Implemented in Swing.Spectator.

bool Swing.ISpectator.Save ( string  fileName)

Save the CWR (current working replay) in the storage

File path is PersistentDataPath + fileName.

Parameters
fileNamefileName to save
Returns
true if it is possible to save operation, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.SeekToRate ( float  ratio)

Seek the time by ratio in the CWR

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

Implemented in Swing.Spectator.

bool Swing.ISpectator.SeekToTime ( float  time)

Seek to the time in the CWR

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

Implemented in Swing.Spectator.

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

Set Credentail to use the spectator service

Parameters
credentialcredential of user

Implemented in Swing.Spectator.

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

Set configuration of server

The configuration is information of server about spectator service.

Parameters
configconfiguration of spectator service server

Implemented in Swing.Spectator.

bool Swing.ISpectator.Stop ( )

Stop the current operation

Returns
true if successful, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.Upload ( )

Save the CWR (current working replay) in the server

Returns
true if it can do upload operation, false otherwise

Implemented in Swing.Spectator.

bool Swing.ISpectator.Watch ( )

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

Returns
true if it can watch, false otherwise

Implemented in Swing.Spectator.

Property Documentation

Spectator.Microphone Swing.ISpectator.microphone
get

Get the spectator's microphone

BroadcastEvent Swing.ISpectator.OnBroadcast
get

Gets an callback event handler on broadcasting

LoadReplayEvent Swing.ISpectator.OnDownload
get

Gets an callback event handler on downloading

ListReplaysEvent Swing.ISpectator.OnListBroadcast
get

Gets an callback event handler on listing broadcast

ListReplaysEvent Swing.ISpectator.OnListReplay
get

Gets an callback event handler on listing replay

LoadReplayEvent Swing.ISpectator.OnLoad
get

Gets an callback event handler on loading

PlayEvent Swing.ISpectator.OnPlay
get

Gets an callback event handler on playing

RecordEvent Swing.ISpectator.OnRecord
get

Gets an callback event handler on recording

SaveReplayEvent Swing.ISpectator.OnSave
get

Gets an callback event handler on saving

SaveReplayEvent Swing.ISpectator.OnUpload
get

Gets an callback event handler on uploading

WatchEvent Swing.ISpectator.OnWatch
get

Gets an callback event handler on watching

Replay Swing.ISpectator.replay
get

CWR, Current Working Replay

It is null if there is no current working replay.

Spectator.States Swing.ISpectator.state
get

The state of this spectator

Timeline Swing.ISpectator.timeline
get

Current replay timeline


The documentation for this interface was generated from the following file: