FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.Comms.Voice.VoiceManager Class Reference

Manages voice communication channels and client voice broadcasting. More...

Inheritance diagram for FMAR.Comms.Voice.VoiceManager:

Public Member Functions

override void OnNetworkSpawn ()
 
void AddVoiceChannel (string channelName)
 Adds a new voice channel.
 
void AddVoiceChannels (string[] channelNames)
 Adds multiple new voice channels.
 
void JoinVoiceChannelServerRpc (byte channelId, ServerRpcParams serverRpcParams=default)
 Server RPC to join a voice channel.
 
void LeaveVoiceChannelServerRpc (ServerRpcParams serverRpcParams=default)
 Server RPC to leave a voice channel.
 
override void OnDestroy ()
 

Static Public Member Functions

static byte GenerateVoiceChannelId ()
 Generates a unique ID for a new voice channel.
 
static void ServerJoinVoiceChannel (byte channelId, ulong clientId)
 Adds a client to a voice channel on the server.
 
static void ServerLeaveVoiceChannel (byte channelId, ulong clientId)
 Removes a client from a voice channel on the server.
 
static VoiceChannel GetVoiceChannel (byte id)
 Gets a voice channel by its ID.
 
static void AddTranscriptionToChannel (byte channelId, Transcription transcription)
 Adds a transcription to a voice channel.
 
static void PlayJoinSfx ()
 Plays the sound effect for joining a channel.
 
static void PlayLeaveSfx ()
 Plays the sound effect for leaving a channel.
 

Static Public Attributes

static VoiceManager Instance
 

Properties

static ConcurrentDictionary< ulong, ClientVoiceBroadcasterClientInstances [get]
 

Events

static Action< VoiceChannel[]> ServerOnVoiceChannelsChanged
 
static Action< VoiceChannel[]> ClientOnVoiceChannelsChanged
 
static Action< ulong, byte > ServerOnClientJoinVoiceChannel
 

Detailed Description

Manages voice communication channels and client voice broadcasting.

Member Function Documentation

◆ AddTranscriptionToChannel()

static void FMAR.Comms.Voice.VoiceManager.AddTranscriptionToChannel ( byte channelId,
Transcription transcription )
inlinestatic

Adds a transcription to a voice channel.

Parameters
channelIdThe ID of the channel.
transcriptionThe transcription to add.

◆ AddVoiceChannel()

void FMAR.Comms.Voice.VoiceManager.AddVoiceChannel ( string channelName)
inline

Adds a new voice channel.

Parameters
channelNameThe name of the new channel.

◆ AddVoiceChannels()

void FMAR.Comms.Voice.VoiceManager.AddVoiceChannels ( string[] channelNames)
inline

Adds multiple new voice channels.

Parameters
channelNamesArray of channel names to add.

◆ GenerateVoiceChannelId()

static byte FMAR.Comms.Voice.VoiceManager.GenerateVoiceChannelId ( )
inlinestatic

Generates a unique ID for a new voice channel.

Returns
The generated voice channel ID.

◆ GetVoiceChannel()

static VoiceChannel FMAR.Comms.Voice.VoiceManager.GetVoiceChannel ( byte id)
inlinestatic

Gets a voice channel by its ID.

Parameters
idThe ID of the voice channel.
Returns
The voice channel with the specified ID.

◆ JoinVoiceChannelServerRpc()

void FMAR.Comms.Voice.VoiceManager.JoinVoiceChannelServerRpc ( byte channelId,
ServerRpcParams serverRpcParams = default )
inline

Server RPC to join a voice channel.

Parameters
channelIdThe ID of the channel to join.
serverRpcParamsParameters for the server RPC.

◆ LeaveVoiceChannelServerRpc()

void FMAR.Comms.Voice.VoiceManager.LeaveVoiceChannelServerRpc ( ServerRpcParams serverRpcParams = default)
inline

Server RPC to leave a voice channel.

Parameters
serverRpcParamsParameters for the server RPC.

◆ OnDestroy()

override void FMAR.Comms.Voice.VoiceManager.OnDestroy ( )
inline

◆ OnNetworkSpawn()

override void FMAR.Comms.Voice.VoiceManager.OnNetworkSpawn ( )
inline

◆ PlayJoinSfx()

static void FMAR.Comms.Voice.VoiceManager.PlayJoinSfx ( )
inlinestatic

Plays the sound effect for joining a channel.

◆ PlayLeaveSfx()

static void FMAR.Comms.Voice.VoiceManager.PlayLeaveSfx ( )
inlinestatic

Plays the sound effect for leaving a channel.

◆ ServerJoinVoiceChannel()

static void FMAR.Comms.Voice.VoiceManager.ServerJoinVoiceChannel ( byte channelId,
ulong clientId )
inlinestatic

Adds a client to a voice channel on the server.

Parameters
channelIdThe ID of the channel to join.
clientIdThe ID of the client joining the channel.

◆ ServerLeaveVoiceChannel()

static void FMAR.Comms.Voice.VoiceManager.ServerLeaveVoiceChannel ( byte channelId,
ulong clientId )
inlinestatic

Removes a client from a voice channel on the server.

Parameters
channelIdThe ID of the channel to leave.
clientIdThe ID of the client leaving the channel.

Member Data Documentation

◆ Instance

VoiceManager FMAR.Comms.Voice.VoiceManager.Instance
static

Property Documentation

◆ ClientInstances

ConcurrentDictionary<ulong, ClientVoiceBroadcaster> FMAR.Comms.Voice.VoiceManager.ClientInstances
staticget

Event Documentation

◆ ClientOnVoiceChannelsChanged

Action<VoiceChannel[]> FMAR.Comms.Voice.VoiceManager.ClientOnVoiceChannelsChanged
static

◆ ServerOnClientJoinVoiceChannel

Action<ulong, byte> FMAR.Comms.Voice.VoiceManager.ServerOnClientJoinVoiceChannel
static

◆ ServerOnVoiceChannelsChanged

Action<VoiceChannel[]> FMAR.Comms.Voice.VoiceManager.ServerOnVoiceChannelsChanged
static

The documentation for this class was generated from the following file: