public async Task SendSSRCMap(List <SSRCData> ssrcDataList)
        {
            SSRCMapData ssrcMapData = new SSRCMapData();

            ssrcMapData.localID      = localID;
            ssrcMapData.originID     = originID;
            ssrcMapData.deviceID     = deviceID;
            ssrcMapData.timestamp    = DateTime.UtcNow.ToUnixTimeStampMiliseconds();
            ssrcMapData.connectionID = connectionID;
            ssrcMapData.remoteID     = remoteID;
            ssrcMapData.ssrcData     = ssrcDataList;

            Debug.WriteLine("SSRCMap: ");
            await callstats.SSRCMap(ssrcMapData);
        }
Esempio n. 2
0
        public async Task StepsToIntegrate(CreateConferenceData createConferenceData, UserAliveData userAliveData,
                                           FabricSetupData fabricSetupData, FabricSetupFailedData fabricSetupFailedData,
                                           SSRCMapData ssrcMapData, ConferenceStatsSubmissionData conferenceStatsSubmissionData,
                                           FabricTerminatedData fabricTerminatedData, UserLeftData userLeftData)
        {
            string authContent = await Authentication();

            string accessToken = DeserializeJson <AuthenticationResponse>(authContent).access_token;

            _client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");

            Debug.WriteLine("CreateConference: ");
            var confContent = await CreateConference(createConferenceData);

            _ucID = DeserializeJson <ConferenceResponse>(confContent.Item2).ucID;

            Timer timer = new Timer(10000);

            timer.Elapsed += async(sender, e) =>
            {
                Debug.WriteLine("UserAlive: ");
                await UserAlive(userAliveData);
            };
            timer.Start();

            Debug.WriteLine("FabricSetup: ");
            var fabricStatus = await FabricSetup(fabricSetupData);

            if (fabricStatus.Item1 != HttpStatusCode.OK)
            {
                Debug.WriteLine("FabricSetupFailed: ");
                await FabricSetupFailed(fabricSetupFailedData);
            }

            Debug.WriteLine("SSRCMap: ");
            await SSRCMap(ssrcMapData);

            Debug.WriteLine("ConferenceStatsSubmission: ");
            await ConferenceStatsSubmission(conferenceStatsSubmissionData);

            Debug.WriteLine("FabricTerminated: ");
            await FabricTerminated(fabricTerminatedData);

            Debug.WriteLine("UserLeft: ");
            await UserLeft(userLeftData);
        }
Esempio n. 3
0
 public async Task SSRCMap(SSRCMapData ssrcMapData)
 {
     await SendRequest(ssrcMapData, UrlBuilder(Host.events.ToString(),
                                               $"/v1/apps/{_appID}/conferences/{_confID}/{_ucID}/events/ssrcmap"));
 }