Component that represents a Voice client.
More...
Inherits ConnectionHandler.
Inherited by UnityVoiceClient, and VoiceFollowClient.
|
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...
|
|
|
override void | Awake () |
|
virtual void | Update () |
|
virtual void | FixedUpdate () |
|
virtual void | OnDestroy () |
|
virtual Speaker | InstantiateSpeakerForRemoteVoice (int playerId, byte voiceId, object userData) |
|
virtual void | OnVoiceStateChanged (ClientState fromState, ClientState toState) |
|
void | CalcStatistics () |
|
virtual void | OnOperationResponseReceived (OperationResponse operationResponse) |
|
Component that represents a Voice client.
◆ AddSpeaker()
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.
- Parameters
-
speaker | Speaker ot try linking. |
userData | UserData object used to bind local Speaker with remote voice stream. |
- Returns
◆ ConnectUsingSettings()
virtual bool ConnectUsingSettings |
( |
AppSettings |
overwriteSettings = null | ) |
|
|
virtual |
Connect to Photon server using Settings
- Parameters
-
overwriteSettings | Overwrites Settings before connecting |
- Returns
- If true voice connection command was sent from client
Reimplemented in UnityVoiceClient.
◆ InstantiateSpeakerPrefab()
Speaker InstantiateSpeakerPrefab |
( |
GameObject |
parent, |
|
|
bool |
destroyOnRemove |
|
) |
| |
Instantiates SpeakerPrefab, optionally attaches it to the provided parent.
VoiceConnection manages the instantiated object (destroys on OnRemoteVoiceRemoveAction).
- Parameters
-
parent | The object to attach Steaker to. |
destroyOnRemove | Automatically destroy instantiated prefab when remote voice is removed (the caller does not manages the instance). |
- Returns
- Instantiated Speaker or null.
◆ ChannelAudio
const int ChannelAudio = 1 |
|
static |
Recommended Photon Transport channel for audio. Chosen not to interfere with video and default channel.
◆ ChannelVideo
const int ChannelVideo = 2 |
|
static |
Recommended Photon Transport channel for video. Chosen not to interfere with audio and default channel.
◆ Settings
Settings to be used by this Voice Client
◆ UsePrimaryRecorder
bool UsePrimaryRecorder => this.usePrimaryRecorder |
◆ BestRegionSummaryInPreferences
string BestRegionSummaryInPreferences |
|
getset |
Used to store and access the "Best Region Summary" in the Player Preferences.
◆ ClientState
◆ FramesLostPercent
Percentage of lost frames.
◆ FramesLostPerSecond
float FramesLostPerSecond |
|
get |
Number of frames lost per second.
◆ FramesReceivedPerSecond
float FramesReceivedPerSecond |
|
get |
Number of frames received per second.
◆ PrimaryRecorder
◆ SpeakerPrefab
Prefab that contains Speaker component to be instantiated when receiving a new remote audio source info
◆ VoiceClient
◆ RemoteVoiceAdded
Fires when a remote voice stream is added
◆ SpeakerLinked
Fires when a speaker has been linked to a remote audio stream