public async Task AddIceCandidate(IceCandidateArgs args)
 {
     Console.WriteLine("AddIceCandidate: " + args.CandidateDto.Candidate);
     await jsRuntime.InvokeVoidAsync("WebRtcHandlerManager.addIceCandidate",
                                     handlerId,
                                     args.ConnectionId,
                                     args.CandidateDto.Candidate,
                                     args.CandidateDto.SdpMid,
                                     args.CandidateDto.SdpMLineIndex,
                                     args.CandidateDto.UsernameFragment);
 }
Exemple #2
0
        public void AddIceCandidate(IceCandidateArgs args)
        {
            Console.WriteLine("Add ice candidate");
            if (args.ConnectionId != ConnectionId)
            {
                throw new Exception();
            }

            _peerConnection.addIceCandidate(new RTCIceCandidateInit
            {
                candidate        = args.CandidateDto.Candidate,
                sdpMid           = args.CandidateDto.SdpMid,
                sdpMLineIndex    = (ushort)args.CandidateDto.SdpMLineIndex,
                usernameFragment = args.CandidateDto.UsernameFragment
            });
        }
Exemple #3
0
        private async Task AddIceCandidate(IceCandidateArgs args)
        {
            await InvokeOnClients(webRtcClient => webRtcClient.AddIceCandidate(args));

            IceCandidateReceived?.Invoke(this, args);
        }
Exemple #4
0
 public Task SendIceCandidate(IceCandidateArgs args)
 => hubConnection.InvokeAsync(nameof(SendIceCandidate), args);
Exemple #5
0
 public Task SendIceCandidate(IceCandidateArgs args)
 {
     return(CallOnCurrentClient(c => c.OnIceCandidateReceived(args)));
 }
 public Task AddIceCandidate(IceCandidateArgs args)
 {
     _peer.AddIceCandidate(args);
     return(Task.CompletedTask);
 }
Exemple #7
0
 public Task AddIceCandidate(IceCandidateArgs args)
 {
     webRtcClient.ReceiveCandidate(args.ConnectionId, new IceCandidate(args.CandidateDto.SdpMid, args.CandidateDto.SdpMLineIndex, args.CandidateDto.Candidate));
     return(Task.CompletedTask);
 }