Photon Voice v2.21

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

Component that should be attached to a networked PUN prefab that has PhotonView. It will bind remote Recorder with local Speaker of the same networked prefab. This component makes automatic voice stream routing easy for players' characters/avatars. More...

Inherits VoiceComponent.

Public Member Functions

void Init ()
 Initializes this PhotonVoiceView for Voice usage based on the PhotonView, Recorder and Speaker components. More...
 

Public Attributes

bool AutoCreateRecorderIfNotFound
 If true, a Recorder component will be added to the same GameObject if not found already. More...
 
bool UsePrimaryRecorder
 If true, PhotonVoiceNetwork.PrimaryRecorder will be used by this PhotonVoiceView More...
 
bool SetupDebugSpeaker
 If true, a Speaker component will be setup to be used for the DebugEcho mode More...
 

Protected Member Functions

override void Awake ()
 

Properties

Recorder RecorderInUse [get, set]
 The Recorder component currently used by this PhotonVoiceView More...
 
Speaker SpeakerInUse [get, set]
 The Speaker component currently used by this PhotonVoiceView More...
 
bool IsSetup [get]
 If true, this PhotonVoiceView is setup and ready to be used More...
 
bool IsSpeaker [get]
 If true, this PhotonVoiceView has a Speaker setup for playback of received audio frames from remote audio source More...
 
bool IsSpeaking [get]
 If true, this PhotonVoiceView has a Speaker that is currently playing received audio frames from remote audio source More...
 
bool IsRecorder [get]
 If true, this PhotonVoiceView has a Recorder setup for transmission of audio stream from local audio source More...
 
bool IsRecording [get]
 If true, this PhotonVoiceView has a Recorder that is currently transmitting audio stream from local audio source More...
 
bool IsSpeakerLinked [get]
 If true, the SpeakerInUse is linked to the remote voice stream More...
 
bool IsPhotonViewReady [get]
 If true, the PhotonView attached to the same GameObject has a valid ViewID > 0 More...
 
- Properties inherited from VoiceComponent
VoiceLogger Logger [get, protected set]
 
DebugLevel LogLevel [get, set]
 
bool IgnoreGlobalLogLevel [get, set]
 
- Properties inherited from ILoggableDependent
bool IgnoreGlobalLogLevel [get, set]
 
- Properties inherited from ILoggable
DebugLevel LogLevel [get, set]
 
VoiceLogger Logger [get]
 

Additional Inherited Members

- Protected Attributes inherited from VoiceComponent
DebugLevel logLevel = DebugLevel.INFO
 

Detailed Description

Component that should be attached to a networked PUN prefab that has PhotonView. It will bind remote Recorder with local Speaker of the same networked prefab. This component makes automatic voice stream routing easy for players' characters/avatars.

Member Function Documentation

◆ Init()

void Init ( )

Initializes this PhotonVoiceView for Voice usage based on the PhotonView, Recorder and Speaker components.

The initialization should happen automatically. Call this method explicitly if this does not succeed. The initialization is a two steps operation: step one is the setup of Recorder and Speaker to be used. Step two is the late-linking -if needed- of the SpeakerInUse and corresponding remote voice info -if any- via ViewID.

Member Data Documentation

◆ AutoCreateRecorderIfNotFound

bool AutoCreateRecorderIfNotFound

If true, a Recorder component will be added to the same GameObject if not found already.

◆ SetupDebugSpeaker

bool SetupDebugSpeaker

If true, a Speaker component will be setup to be used for the DebugEcho mode

◆ UsePrimaryRecorder

bool UsePrimaryRecorder

If true, PhotonVoiceNetwork.PrimaryRecorder will be used by this PhotonVoiceView

Property Documentation

◆ IsPhotonViewReady

bool IsPhotonViewReady
get

If true, the PhotonView attached to the same GameObject has a valid ViewID > 0

◆ IsRecorder

bool IsRecorder
get

If true, this PhotonVoiceView has a Recorder setup for transmission of audio stream from local audio source

◆ IsRecording

bool IsRecording
get

If true, this PhotonVoiceView has a Recorder that is currently transmitting audio stream from local audio source

◆ IsSetup

bool IsSetup
get

If true, this PhotonVoiceView is setup and ready to be used

◆ IsSpeaker

bool IsSpeaker
get

If true, this PhotonVoiceView has a Speaker setup for playback of received audio frames from remote audio source

◆ IsSpeakerLinked

bool IsSpeakerLinked
get

If true, the SpeakerInUse is linked to the remote voice stream

◆ IsSpeaking

bool IsSpeaking
get

If true, this PhotonVoiceView has a Speaker that is currently playing received audio frames from remote audio source

◆ RecorderInUse

Recorder RecorderInUse
getset

The Recorder component currently used by this PhotonVoiceView

◆ SpeakerInUse

Speaker SpeakerInUse
getset

The Speaker component currently used by this PhotonVoiceView