private void OnChannelOpenedOrClosed(string channel, ChannelProperties properties) { var channels = _playerChannels.Count + _roomChannels.Count; if (channels == 1) { Log.Debug("Local player started speaking"); _localPlayerState.InvokeOnStartedSpeaking(); } else if (channels == 0) { Log.Debug("Local player stopped speaking"); _localPlayerState.InvokeOnStoppedSpeaking(); } }
protected override RoomChannel CreateChannel(ushort subscriptionId, string channelId, ChannelProperties properties) { return(new RoomChannel(subscriptionId, channelId, this, properties)); }
internal RoomChannel(ushort subscriptionId, string roomId, RoomChannels channels, ChannelProperties properties) { _subscriptionId = subscriptionId; _roomId = roomId; _channels = channels; _properties = properties; }
internal PlayerChannel(ushort subscriptionId, string playerId, PlayerChannels channels, ChannelProperties properties) { _subscriptionId = subscriptionId; _playerId = playerId; _channels = channels; _properties = properties; }
[NotNull] protected abstract T CreateChannel(ushort subscriptionId, TId channelId, ChannelProperties properties);