/// <summary> /// Ons the link send candidate. /// </summary> /// <returns>The link send candidate.</returns> /// <param name="e">E.</param> private void OnLinkSendCandidate(LinkCandidateArgs e) { var handler = this.ReceiveIceCandidateEvent; if (handler != null) { var iceCandidateEventArgs = new IceCandidateEventArgs() { SdpMLineIndex = e.Candidate.SdpMediaIndex.HasValue ? e.Candidate.SdpMediaIndex.Value.ToString() : "", Candidate = e.Candidate.SdpCandidateAttribute, }; handler.Invoke(this, iceCandidateEventArgs); } }
private void OnReceiveIceCandidate(object sender, IceCandidateEventArgs e) { if (sessionId == null) { return; } var iceCandidates = new Collection <IceCandidate>(); iceCandidates.Add(new IceCandidate() { SdpMLineIndex = e.SdpMLineIndex, Candidate = e.Candidate }); foreach (var user in opponents) { this.webSyncClient.IceCandidates(this.sessionId, iceCandidates, caller.Id.ToString(), user.Id.ToString(), this.receivers.Select(u => u.Id.ToString()).ToList(), Device.OS.ToString().ToLower()); } }
/// <summary> /// Ons the link send candidate. /// </summary> /// <returns>The link send candidate.</returns> /// <param name="e">E.</param> private void OnLinkSendCandidate(LinkCandidateArgs e) { var handler = this.ReceiveIceCandidateEvent; if (handler != null) { var iceCandidateEventArgs = new IceCandidateEventArgs() { SdpMLineIndex = e.Candidate.SdpMediaIndex.HasValue ? e.Candidate.SdpMediaIndex.Value.ToString() : "", Candidate = e.Candidate.SdpCandidateAttribute, }; handler.Invoke(this, iceCandidateEventArgs); } }