/// <summary>
        /// This method changes the session description
        /// of the remote connection to negotiate with local connections.
        /// </summary>
        /// <param name="desc"></param>
        /// <returns>
        /// An AsyncOperation which resolves with an <see cref="RTCSessionDescription"/>
        /// object providing a description of the session.
        /// </returns>
        /// <exception cref="ArgumentException">
        /// Thrown when an argument has an invalid value.
        /// For example, when passed the sdp which is null or empty.
        /// </exception>
        /// <exception cref="RTCErrorException">
        /// Thrown when an argument has an invalid value.
        /// For example, when passed the sdp which is not be able to parse.
        /// </exception>
        /// <seealso cref="RemoteDescription"/>
        public RTCSetSessionDescriptionAsyncOperation SetRemoteDescription(
            ref RTCSessionDescription desc)
        {
            if (string.IsNullOrEmpty(desc.sdp))
            {
                throw new ArgumentException("sdp is null or empty");
            }

            var      op    = new RTCSetSessionDescriptionAsyncOperation(this);
            RTCError error = WebRTC.Context.PeerConnectionSetRemoteDescription(
                GetSelfOrThrow(), ref desc);

            if (error.errorType == RTCErrorType.None)
            {
                return(op);
            }
            throw new RTCErrorException(ref error);
        }
Beispiel #2
0
 public static extern bool PeerConnectionGetCurrentRemoteDescription(IntPtr ptr, ref RTCSessionDescription desc);
Beispiel #3
0
 public static extern bool PeerConnectionGetPendingLocalDescription(IntPtr ptr, ref RTCSessionDescription desc);
Beispiel #4
0
 public static extern RTCErrorType PeerConnectionSetRemoteDescription(IntPtr context, IntPtr ptr, ref RTCSessionDescription desc, ref IntPtr error);
Beispiel #5
0
 public void PeerConnectionSetRemoteDescription(IntPtr ptr, ref RTCSessionDescription desc)
 {
     NativeMethods.PeerConnectionSetRemoteDescription(self, ptr, ref desc);
 }
Beispiel #6
0
 public static extern void PeerConnectionSetRemoteDescription(IntPtr context, IntPtr ptr, ref RTCSessionDescription desc);
Beispiel #7
0
 public static extern void PeerConnectionGetLocalDescription(IntPtr ptr, ref RTCSessionDescription desc);