Photon Voice v2.21

Public Member Functions | Properties | List of all members
Speaker Class Reference

Component representing remote audio stream in local scene. More...

Inherits VoiceComponent.

Public Member Functions

bool StartPlayback ()
 Starts the audio playback of the linked incoming remote audio stream via AudioSource component. More...
 
bool StopPlayback ()
 Stops the audio playback of the linked incoming remote audio stream via AudioSource component. More...
 
bool RestartPlayback ()
 Restarts the audio playback of the linked incoming remote audio stream via AudioSource component. More...
 

Properties

int PlayDelayMs [get, set]
 
bool IsPlaying [get]
 Is the speaker playing right now. More...
 
int? Lag [get]
 Smoothed difference between (jittering) stream and (clock-driven) audioOutput. More...
 
Action< SpeakerOnRemoteVoiceRemoveAction [get, set]
 Register a method to be called when remote voice removed. More...
 
Realtime.Player Actor [get, set]
 Per room, the connected users/players are represented with a Realtime.Player, also known as Actor. More...
 
bool IsLinked [get]
 Whether or not this Speaker has been linked to a remote voice stream. More...
 
bool PlaybackOnlyWhenEnabled [get, set]
 If true, component will work only when enabled and active in hierarchy. More...
 
bool PlaybackStarted [get]
 Returns if the playback is on. 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 Member Functions inherited from VoiceComponent
virtual void Awake ()
 
- Protected Attributes inherited from VoiceComponent
DebugLevel logLevel = DebugLevel.INFO
 

Detailed Description

Component representing remote audio stream in local scene.

Member Function Documentation

◆ RestartPlayback()

bool RestartPlayback ( )

Restarts the audio playback of the linked incoming remote audio stream via AudioSource component.

Returns
True if playback is successfully restarted.

◆ StartPlayback()

bool StartPlayback ( )

Starts the audio playback of the linked incoming remote audio stream via AudioSource component.

Returns
True if playback is successfully started.

◆ StopPlayback()

bool StopPlayback ( )

Stops the audio playback of the linked incoming remote audio stream via AudioSource component.

Returns
True if playback is successfully stopped.

Property Documentation

◆ Actor

Realtime.Player Actor
getset

Per room, the connected users/players are represented with a Realtime.Player, also known as Actor.

Photon Voice calls this Actor, to avoid a name-clash with the Player class in Voice.

◆ IsLinked

bool IsLinked
get

Whether or not this Speaker has been linked to a remote voice stream.

◆ IsPlaying

bool IsPlaying
get

Is the speaker playing right now.

◆ Lag

int? Lag
get

Smoothed difference between (jittering) stream and (clock-driven) audioOutput.

◆ OnRemoteVoiceRemoveAction

Action<Speaker> OnRemoteVoiceRemoveAction
getset

Register a method to be called when remote voice removed.

◆ PlaybackOnlyWhenEnabled

bool PlaybackOnlyWhenEnabled
getset

If true, component will work only when enabled and active in hierarchy.

◆ PlaybackStarted

bool PlaybackStarted
get

Returns if the playback is on.