예제 #1
0
        private async Task WebRtcHandshake()
        {
            var localDescription = await this.PeerConnection.CreateOffer();

            await this.PeerConnection.SetLocalDescription(localDescription);

            var remoteDescription = await SignallingClient.SendOfferAndGetAnswerAsync(localDescription, this.ServerAddress);

            await this.PeerConnection.SetRemoteDescription(remoteDescription);
        }
예제 #2
0
        private async Task SubmitIceCandidatesAsync()
        {
            var Complete = RTCIceGatheringState.Complete;
            await Task.Run(() => SpinWait.SpinUntil(() => this.PeerConnection.IceGatheringState == Complete));

            foreach (var candidate in this.IceCandidates)
            {
                var answer = await SignallingClient.SendIceCandidateAndGetResonse(candidate, this.ServerAddress);

                Logger.Log($"Submitted ice candidate, received answer: \n{answer}");
            }
        }