Photon Voice v2.53

Public Member Functions | Public Attributes | Protected Member Functions | List of all members
UnityVoiceClient Class Reference

Component that represents a Voice client and manages a simple Unity integration: a single Recorder and multiple remote speakers. More...

Inherits VoiceConnection.

Public Member Functions

override bool ConnectUsingSettings (AppSettings overwriteSettings=null)
 Connect to Photon server using Settings More...
 
- Public Member Functions inherited from VoiceConnection
bool AddSpeaker (Speaker speaker, object userData)
 Tries to link local Speaker with remote voice stream using UserData. Useful if Speaker created after stream is started. More...
 
Speaker InstantiateSpeakerPrefab (GameObject parent, bool destroyOnRemove)
 Instantiates SpeakerPrefab, optionally attaches it to the provided parent. More...
 
bool AddRecorder (Recorder rec)
 
void RemoveRecorder (Recorder rec)
 

Public Attributes

override bool AlwaysUsePrimaryRecorder => true
 
bool UseVoiceAppSettings = false
 Whether or not to use the Voice AppId and all the other AppSettings from Fusion's RealtimeAppSettings ScriptableObject singleton in the Voice client/app. More...
 
- Public Attributes inherited from VoiceConnection
virtual bool AlwaysUsePrimaryRecorder => false
 
AppSettings Settings
 Settings to be used by this Voice Client More...
 
VoiceLogger VoiceLogger => voiceComponentImpl.VoiceLogger
 
bool UsePrimaryRecorder => this.usePrimaryRecorder
 Use VoiceConnection.PrimaryRecorder directly. More...
 

Protected Member Functions

virtual void Start ()
 
override Speaker InstantiateSpeakerForRemoteVoice (int playerId, byte voiceId, object userData)
 
- Protected Member Functions inherited from VoiceConnection
override void Awake ()
 
virtual void Update ()
 
virtual void FixedUpdate ()
 
virtual void OnDestroy ()
 
virtual void OnVoiceStateChanged (ClientState fromState, ClientState toState)
 
void CalcStatistics ()
 
virtual void OnOperationResponseReceived (OperationResponse operationResponse)
 

Additional Inherited Members

- Static Public Attributes inherited from VoiceConnection
const int ChannelAudio = 1
 Recommended Photon Transport channel for audio. Chosen not to interfere with video and default channel. More...
 
const int ChannelVideo = 2
 Recommended Photon Transport channel for video. Chosen not to interfere with audio and default channel. More...
 
- Protected Attributes inherited from VoiceConnection
Voice.ILogger Logger => voiceComponentImpl.Logger
 
- Properties inherited from VoiceConnection
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...
 
Recorder PrimaryRecorder [get, set]
 Primary Recorder to be used by VoiceConnection implementations directly or via integration objects. More...
 
string BestRegionSummaryInPreferences [get, set]
 Used to store and access the "Best Region Summary" in the Player Preferences. More...
 
- Events inherited from VoiceConnection
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 Voice client and manages a simple Unity integration: a single Recorder and multiple remote speakers.

Member Function Documentation

◆ ConnectUsingSettings()

override bool ConnectUsingSettings ( AppSettings  overwriteSettings = null)
virtual

Connect to Photon server using Settings

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

Reimplemented from VoiceConnection.

Member Data Documentation

◆ UseVoiceAppSettings

bool UseVoiceAppSettings = false

Whether or not to use the Voice AppId and all the other AppSettings from Fusion's RealtimeAppSettings ScriptableObject singleton in the Voice client/app.