Photon Voice: LoadBalancingTransport Class Reference

Photon Voice

LoadBalancingTransport Class Reference

Extends LoadBalancingClient with audio streaming functionality. More...

Inherits LoadBalancingClient, IVoiceTransport, and IDisposable.

Inherited by LoadBalancingFrontend.

Public Member Functions

void LogError (string fmt, params object[] args)
 
void LogWarning (string fmt, params object[] args)
 
void LogInfo (string fmt, params object[] args)
 
void LogDebug (string fmt, params object[] args)
 
bool IsChannelJoined (int channelId)
 
void SetDebugEchoMode (LocalVoice v)
 
 LoadBalancingTransport (ConnectionProtocol connectionProtocol=ConnectionProtocol.Udp)
 Initializes a new LoadBalancingTransport. More...
 
new void Service ()
 This method dispatches all available incoming commands and then sends this client's outgoing commands. Call this method regularly (2 to 20 times a second). More...
 
virtual bool ChangeAudioGroups (byte[] groupsToRemove, byte[] groupsToAdd)
 
void SendVoicesInfo (IEnumerable< LocalVoice > voices, int channelId, int targetPlayerId)
 
void SendDebugEchoVoicesInfo (int channelId)
 Send VoicesInfo events to the local player for all voices that have DebugEcho enabled. More...
 
void SendVoiceRemove (LocalVoice voice, int channelId, int targetPlayerId)
 
void SendFrame (ArraySegment< byte > data, byte evNumber, byte voiceId, int channelId, LocalVoice localVoice)
 
string ChannelIdStr (int channelId)
 
string PlayerIdStr (int playerId)
 
void Dispose ()
 Releases all resources used by the LoadBalancingTransport instance. More...
 

Protected Attributes

VoiceClient voiceClient
 

Properties

VoiceClient VoiceClient [get]
 The VoiceClient implementation associated with this LoadBalancingTransport. More...
 
byte GlobalAudioGroup [get, set]
 
byte GlobalInterestGroup [get, set]
 Set global audio group for this client. This call sets InterestGroup for existing local voices and for created later to given value. Client set as listening to this group only until LoadBalancingPeer.OpChangeGroups() called. This method can be called any time. More...
 

Detailed Description

Extends LoadBalancingClient with audio streaming functionality.

Use your normal LoadBalancing workflow to join a Voice room. All standard LoadBalancing features are available.

To work with audio:

  • Create outgoing audio streams with Client.CreateLocalVoice.
  • Handle new incoming audio streams info with OnRemoteVoiceInfoAction .
  • Handle incoming audio streams data with OnAudioFrameAction .
  • Handle closing of incoming audio streams with .

Constructor & Destructor Documentation

LoadBalancingTransport ( ConnectionProtocol  connectionProtocol = ConnectionProtocol.Udp)

Initializes a new LoadBalancingTransport.

Parameters
connectionProtocolConnection protocol (UDP or TCP). ConnectionProtocol

Member Function Documentation

void Dispose ( )

Releases all resources used by the LoadBalancingTransport instance.

void SendDebugEchoVoicesInfo ( int  channelId)

Send VoicesInfo events to the local player for all voices that have DebugEcho enabled.

This function will call SendVoicesInfo for all local voices of our VoiceClient that have DebugEchoMode set to true, with the given channel ID, and the local Player's ActorNumber as target.

Parameters
channelIdTransport Channel ID
new void Service ( )

This method dispatches all available incoming commands and then sends this client's outgoing commands. Call this method regularly (2 to 20 times a second).

Property Documentation

byte GlobalInterestGroup
getset

Set global audio group for this client. This call sets InterestGroup for existing local voices and for created later to given value. Client set as listening to this group only until LoadBalancingPeer.OpChangeGroups() called. This method can be called any time.

LocalVoice.InterestGroup LoadBalancingPeer.OpChangeGroups(byte[], byte[])

The VoiceClient implementation associated with this LoadBalancingTransport.

Online Documentation  -  Dashboard  -  Support Forum Exit Games GmbH