/// <summary> /// Creates a new RTP ICE channel (which manages the UDP socket sending and receiving RTP /// packets) for use with this session. /// </summary> /// <param name="mediaType">The type of media the RTP channel is for. Must be audio or video.</param> /// <returns>A new RTPChannel instance.</returns> protected override RTPChannel CreateRtpChannel(SDPMediaTypesEnum mediaType) { var rtpIceChannel = new RtpIceChannel( _configuration?.X_BindAddress, RTCIceComponent.rtp, _configuration?.iceServers, _configuration != null ? _configuration.iceTransportPolicy : RTCIceTransportPolicy.all); m_rtpChannels.Add(mediaType, rtpIceChannel); rtpIceChannel.OnRTPDataReceived += OnRTPDataReceived; // Start the RTP, and if required the Control, socket receivers and the RTCP session. rtpIceChannel.Start(); return(rtpIceChannel); }