Browse Source

Some renaming

master
Nico de Poel 5 years ago
parent
commit
fa6f730347
  1. 24
      Assets/Scripts/EOSVoiceChat.cs

24
Assets/Scripts/EOSVoiceChat.cs

@ -19,7 +19,7 @@ public class EOSVoiceChat
private readonly LobbyInterface lobbyInterface;
private readonly RTCInterface rtcInterface;
private readonly RTCAudioInterface audioInterface;
private readonly Func<ProductUserId> productUserProvider;
private readonly Func<ProductUserId> localUserProvider;
private readonly IProductUserMapper productUserMapper;
private readonly Dictionary<ProductUserId, ChatUser> chatUsers = new Dictionary<ProductUserId, ChatUser>();
@ -36,12 +36,12 @@ public class EOSVoiceChat
/// </summary>
public EOSVoiceChat(
LobbyInterface lobbyInterface, RTCInterface rtcInterface, RTCAudioInterface audioInterface,
Func<ProductUserId> productUserProvider, IProductUserMapper productUserMapper)
Func<ProductUserId> localUserProvider, IProductUserMapper productUserMapper)
{
this.lobbyInterface = lobbyInterface;
this.rtcInterface = rtcInterface;
this.audioInterface = audioInterface;
this.productUserProvider = productUserProvider;
this.localUserProvider = localUserProvider;
this.productUserMapper = productUserMapper;
}
@ -58,7 +58,7 @@ public class EOSVoiceChat
lobbyInterface.CreateLobbySearch(new CreateLobbySearchOptions { MaxResults = 1 }, out var searchHandle);
searchHandle.SetLobbyId(new LobbySearchSetLobbyIdOptions { LobbyId = chatLobbyName });
var localUserId = productUserProvider.Invoke();
var localUserId = localUserProvider.Invoke();
searchHandle.Find(new LobbySearchFindOptions { LocalUserId = localUserId }, null, findData =>
{
switch (findData.ResultCode)
@ -162,7 +162,7 @@ public class EOSVoiceChat
rtcRoomName = null;
var result = lobbyInterface.GetRTCRoomName(
new GetRTCRoomNameOptions { LocalUserId = productUserProvider.Invoke(), LobbyId = connectedLobbyId },
new GetRTCRoomNameOptions { LocalUserId = localUserProvider.Invoke(), LobbyId = connectedLobbyId },
out string roomName);
if (result != Result.Success)
@ -186,7 +186,7 @@ public class EOSVoiceChat
(
new LeaveLobbyOptions
{
LocalUserId = productUserProvider.Invoke(),
LocalUserId = localUserProvider.Invoke(),
LobbyId = connectedLobbyId,
},
null,
@ -208,7 +208,7 @@ public class EOSVoiceChat
audioInterface.UpdateSending(new UpdateSendingOptions
{
LocalUserId = productUserProvider.Invoke(),
LocalUserId = localUserProvider.Invoke(),
RoomName = rtcRoomName,
AudioStatus = muted ? RTCAudioStatus.Disabled : RTCAudioStatus.Enabled,
}, null, data => { });
@ -227,7 +227,7 @@ public class EOSVoiceChat
{
audioInterface.UpdateReceiving(new UpdateReceivingOptions
{
LocalUserId = productUserProvider.Invoke(),
LocalUserId = localUserProvider.Invoke(),
ParticipantId = remoteProductUser,
RoomName = rtcRoomName,
AudioEnabled = !muted,
@ -244,7 +244,7 @@ public class EOSVoiceChat
if (!IsConnected)
return;
var localUserId = productUserProvider.Invoke();
var localUserId = localUserProvider.Invoke();
foreach (var remoteProductUser in chatUsers.Keys)
{
audioInterface.UpdateReceiving(new UpdateReceivingOptions
@ -265,7 +265,7 @@ public class EOSVoiceChat
{
audioInterface.SetAudioOutputSettings(new SetAudioOutputSettingsOptions
{
LocalUserId = productUserProvider.Invoke(),
LocalUserId = localUserProvider.Invoke(),
DeviceId = null, // Default output device
Volume = volume * 50f,
});
@ -275,7 +275,7 @@ public class EOSVoiceChat
/// Whether the requested player is currently talking or not.
/// This can be either the local player or a remote player.
/// </summary>
public bool IsUserTalking(string playerId)
public bool IsPlayerTalking(string playerId)
{
foreach (var chatUser in chatUsers.Values)
{
@ -292,7 +292,7 @@ public class EOSVoiceChat
private void SubscribeToRoomNotifications()
{
var localUserId = productUserProvider.Invoke();
var localUserId = localUserProvider.Invoke();
if (!onConnectionChangedCallbackId.HasValue)
{

Loading…
Cancel
Save