/// <summary>
        ///
        /// </summary>
        /// <param name="kind"></param>
        /// <param name="init"></param>
        /// <returns></returns>
        public RTCRtpTransceiver AddTransceiver(TrackKind kind, RTCRtpTransceiverInit init = null)
        {
            IntPtr ptr = PeerConnectionAddTransceiverWithType(
                GetSelfOrThrow(), kind, init);

            return(CreateTransceiver(ptr));
        }
        static IntPtr PeerConnectionAddTransceiver(IntPtr pc, IntPtr track, RTCRtpTransceiverInit init)
        {
            if (init == null)
            {
                return(NativeMethods.PeerConnectionAddTransceiver(pc, track));
            }
            RTCRtpTransceiverInitInternal _init = init.Cast();

            return(NativeMethods.PeerConnectionAddTransceiverWithInit(pc, track, ref _init));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="track"></param>
        /// <param name="init"></param>
        /// <returns></returns>
        public RTCRtpTransceiver AddTransceiver(MediaStreamTrack track, RTCRtpTransceiverInit init = null)
        {
            if (track == null)
            {
                throw new ArgumentNullException("track is null.");
            }
            IntPtr ptr = PeerConnectionAddTransceiver(
                GetSelfOrThrow(), track.GetSelfOrThrow(), init);

            return(CreateTransceiver(ptr));
        }
        static IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind, RTCRtpTransceiverInit init)
        {
            if (init == null)
            {
                return(NativeMethods.PeerConnectionAddTransceiverWithType(pc, kind));
            }
            RTCRtpTransceiverInitInternal _init = init.Cast();

            return(NativeMethods.PeerConnectionAddTransceiverWithTypeAndInit(pc, kind, ref _init));
        }