Callback Methods

Work In Progress

Only Applies if Inheriting from EasyManager.cs

Callback Methods can be Overridden

All base. Methods can be deleted. Most are just Debug.Log statements to describe the current Vivox events. You may see some of these callback methods are empty. This is because it was not necessary to add logic to these callbacks since this is merely an example. You may or may not want to use all the callbacks available depending on your application needs.

Login Callbacks

Gets called when local user in the process of logging in

public override void OnLoggingIn(ILoginSession loginSession)
 {
     base.OnLoggingIn(loginSession);
 }

Channel Callbacks

Channel Callbacks

This is called when a channel begins connecting

 public override void OnChannelConnecting(IChannelSession channelSession)
 {
     base.OnChannelConnecting(channelSession);
 }

Voice Channel Callbacks

This is called when a voice channel begins connecting

 public override void OnVoiceConnecting(IChannelSession channelSession)
 {
     base.OnVoiceConnecting(channelSession);
 }

Text Channel Callbacks

This is called when a text channel begins connecting

 public override void OnTextChannelConnecting(IChannelSession channelSession)
 {
     base.OnTextChannelConnecting(channelSession);
 }

User Callbacks

The keywords User and Participant are used interchangeably

This called when a user joins a channel

 public override void OnUserJoinedChannel(IParticipant participant)
 {
     base.OnParticipantAdded(participant);
     messageText.text += $"\n{participant.Account.DisplayName} has joined {participant.ParentChannelSession.Channel.Name}";
 }

This is called when a user is muted

 public override void OnUserMuted(IParticipant participant)
 {
     base.OnUserMuted(participant);
     messageText.text += $"\n{participant.Account.DisplayName} has been muted";
 }

Message Callbacks

This is called when a message is received. Everyone in the same channel will have this event fired

 public override void OnChannelMessageRecieved( IChannelTextMessage textMessage)
 {
      base.OnChannelMessageRecieved(textMessage);
      messageText.text += $"\n{textMessage.ReceivedTime} : From {textMessage.Sender.DisplayName} : {textMessage.Message}";
 }

Text To Speech Callbacks

This is called when a Text To Speech message is playing or added to the queue

 public override void OnTTSMessageAdded(ITTSMessageQueueEventArgs ttsArgs)
 {
     base.OnTTSMessageAdded(ttsArgs);
     messageText.text += $"\nTTS message added : Destination - {ttsArgs.Message.Destination} : Number Of Consumers - {ttsArgs.Message.NumConsumers} : Duration - {ttsArgs.Message.Duration} : State - {ttsArgs.Message.State} : Voice - {ttsArgs.Message.Voice} : TTS Message - {ttsArgs.Message.Text}";
 }

Last updated