public async Task StartSessionAsync() { var sessionId = OpentokTestConstants.GenerateSessionAndTokenWithServer ? await OpentokSessionHelper.RequestDataFromApiAsync(OpentokSessionHelper.SessionRequestURI, OpentokSettings.Current.RoomName) : OpentokTestConstants.SessionId; var token = OpentokTestConstants.GenerateSessionAndTokenWithServer ? await OpentokSessionHelper.RequestDataFromApiAsync(OpentokSessionHelper.TokenRequestURI, sessionId) : OpentokTestConstants.Token; BusyIndicatorView.Hidden = BusyViewLayer.Hidden = BusyTextView.Hidden = true; ContainerView.Hidden = LocalView.Hidden = false; _opentokService.SetStreamContainer(ContainerView, false); _opentokService.SetStreamContainer(LocalView, true); _opentokService.InitNewSession(OpentokTestConstants.OpentokAPIKey, sessionId, token); UIApplication.SharedApplication.IdleTimerDisabled = true; }
public async Task StartSession() { var sessionId = await OpentokSessionHelper.Request(OpentokSessionHelper.SessionRequestURI, OpentokSettings.Current.RoomName); var token = await OpentokSessionHelper.Request(OpentokSessionHelper.TokenRequestURI, sessionId); BusyIndicatorView.Hidden = BusyViewLayer.Hidden = BusyTextView.Hidden = true; ContainerView.Hidden = LocalView.Hidden = false; _opentokService.SetStreamContainer(ContainerView, false); _opentokService.SetStreamContainer(LocalView, true); _opentokService.InitNewSession(OpentokTestConstants.OpentokAPI, sessionId, token); UIApplication.SharedApplication.IdleTimerDisabled = true; }