How to Login into Vivox
Table of contents
No headings in the article.
Work in progress
Settings Manager
Logging into vivox
protected void LoginToVivox(ILoginSession loginSession,
Uri serverUri, string userName, bool joinMuted = false)
{
Subscribe(loginSession);
var accessToken = AccessToken.Token_f(EasySession.SecretKey, EasySession.Issuer,
AccessToken.SecondsSinceUnixEpochPlusDuration(TimeSpan.FromSeconds(90)), "login", EasySession.UniqueCounter, null, EasySIP.GetUserSIP(
EasySession.Issuer, userName, EasySession.Domain), null);
loginSession.ParticipantPropertyFrequency = _settings.VivoxParticipantPropertyUpdateFrequency;
loginSession.BeginLogin(serverUri, accessToken, SubscriptionMode.Accept, null, null, null, ar =>
{
try
{
loginSession.EndLogin(ar);
}
catch (Exception e)
{
Unsubscribe(loginSession);
Debug.LogException(e);
}
finally
{
EasySession.Client.AudioInputDevices.Muted = joinMuted;
loginSession.SetTransmissionMode(TransmissionMode.All);
}
});
}