public static RTCSessionDescription ToRTCSessionDescription(this WebRTCSDP sessionDescription) { if (!sessionDescription.Type.HasValue) { Debug.WriteLine("WebRTCSDP type is null"); } return(new RTCSessionDescription((RTCSdpType)sessionDescription.Type.GetValueOrDefault(), sessionDescription.Sdp)); }
private void ReciveAnswer(WebRTCSDP obj) { // If recive answer then set replay to control WebRtcControl.SendAnswerReplayed(obj); }
private void ReciveOffer(WebRTCSDP obj) { // If recive offer from other client then create answer WebRtcControl.SendAnswerRequested(obj); }
public SdpEventArgs(WebRTCSDP sdp) { Sdp = sdp; }
/// <summary> /// Set answer SDP to local peer /// </summary> /// <param name="sdp"></param> public void SendAnswerReplayed(WebRTCSDP sdp) { AnswerReplayed?.Invoke(this, new SdpEventArgs(sdp)); }
/// <summary> /// Return local peer offer to send via signaling /// </summary> /// <param name="sdp"></param> public void SendOfferRecived(WebRTCSDP sdp) { OfferRecived?.Invoke(this, new SdpEventArgs(sdp)); }