Photon Voice  v2.8
English | 日本語 | 한국
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
VoiceConnection Class Reference

Component that represents a client voice connection to Photon Servers. More...

Inherits ConnectionHandler, and ILoggable.

Inherited by PhotonVoiceNetwork.

Public Member Functions

bool ConnectUsingSettings (AppSettings overwriteSettings=null)
 Connect to Photon server using Settings More...
 

Public Attributes

AppSettings Settings
 Settings to be used by this voice connection More...
 
Recorder PrimaryRecorder
 Main Recorder to be used for transmission by default More...
 
Func< int, byte, object, SpeakerSpeakerFactory
 Special factory to link Speaker components with incoming remote audio streams More...
 

Protected Member Functions

override void Awake ()
 
virtual void Update ()
 
virtual void FixedUpdate ()
 
override void OnDestroy ()
 
virtual Speaker SimpleSpeakerFactory (int playerId, byte voiceId, object userData)
 
virtual void OnVoiceStateChanged (ClientState fromState, ClientState toState)
 
override void OnApplicationQuit ()
 
void CalcStatistics ()
 
void LinkSpeaker (Speaker speaker, RemoteVoiceLink remoteVoice)
 

Protected Attributes

List< RemoteVoiceLinkcachedRemoteVoices = new List<RemoteVoiceLink>()
 

Properties

VoiceLogger Logger [get, protected set]
 Logger used by this component More...
 
DebugLevel LogLevel [get, set]
 Log level for this component More...
 
new LoadBalancingTransport Client [get]
 
VoiceClient VoiceClient [get]
 Returns underlying Photon Voice client. More...
 
ClientState ClientState [get]
 Returns Photon Voice client state. More...
 
float FramesReceivedPerSecond [get]
 Number of frames received per second. More...
 
float FramesLostPerSecond [get]
 Number of frames lost per second. More...
 
float FramesLostPercent [get]
 Percentage of lost frames. More...
 
GameObject SpeakerPrefab [get, set]
 Prefab that contains Speaker component to be instantiated when receiving a new remote audio source info More...
 
- Properties inherited from ILoggable
DebugLevel LogLevel [get, set]
 
VoiceLogger Logger [get]
 

Events

Action< SpeakerSpeakerLinked
 Fires when a speaker has been linked to a remote audio stream More...
 
Action< RemoteVoiceLinkRemoteVoiceAdded
 Fires when a remote voice stream is added More...
 

Detailed Description

Component that represents a client voice connection to Photon Servers.

Member Function Documentation

bool ConnectUsingSettings ( AppSettings  overwriteSettings = null)

Connect to Photon server using Settings

Parameters
overwriteSettingsOverwrites Settings before connecting
Returns
If true voice connection command was sent from client

Member Data Documentation

Recorder PrimaryRecorder

Main Recorder to be used for transmission by default

AppSettings Settings

Settings to be used by this voice connection

Func<int, byte, object, Speaker> SpeakerFactory

Special factory to link Speaker components with incoming remote audio streams

Property Documentation

ClientState ClientState
get

Returns Photon Voice client state.

float FramesLostPercent
get

Percentage of lost frames.

float FramesLostPerSecond
get

Number of frames lost per second.

float FramesReceivedPerSecond
get

Number of frames received per second.

VoiceLogger Logger
getprotected set

Logger used by this component

DebugLevel LogLevel
getset

Log level for this component

GameObject SpeakerPrefab
getset

Prefab that contains Speaker component to be instantiated when receiving a new remote audio source info

Returns underlying Photon Voice client.

Event Documentation

Action<RemoteVoiceLink> RemoteVoiceAdded

Fires when a remote voice stream is added

Action<Speaker> SpeakerLinked

Fires when a speaker has been linked to a remote audio stream