pub(crate) async fn new(api: &API, mut configuration: RTCConfiguration) -> Result<Self> {
        RTCPeerConnection::init_configuration(&mut configuration)?;

        let interceptor = api.interceptor_registry.build("")?;
        let (internal, configuration) =
            PeerConnectionInternal::new(api, Arc::downgrade(&interceptor), configuration).await?;
        let internal_rtcp_writer = Arc::clone(&internal) as Arc<dyn RTCPWriter + Send + Sync>;
        let interceptor_rtcp_writer = interceptor.bind_rtcp_writer(internal_rtcp_writer).await;

        // https://w3c.github.io/webrtc-pc/#constructor (Step #2)
        // Some variables defined explicitly despite their implicit zero values to
        // allow better readability to understand what is happening.
        Ok(RTCPeerConnection {
            stats_id: format!(
                "PeerConnection-{}",
                SystemTime::now()
                    .duration_since(UNIX_EPOCH)
                    .unwrap()
                    .as_nanos()
            ),
            interceptor,
            interceptor_rtcp_writer,
            internal,
            configuration,
            idp_login_url: None,
        })
    }
/// creates a PeerConnection with the default codecs and
/// interceptors.  See register_default_codecs and register_default_interceptors.
///
/// If you wish to customize the set of available codecs or the set of
/// active interceptors, create a MediaEngine and call api.new_peer_connection
/// instead of this function.
creates a PeerConnection with the default codecs and
interceptors.

If you wish to customize the set of available codecs or the set of
active interceptors, create a MediaEngine and call api.new_peer_connection
instead of this function.
creates a PeerConnection with the default codecs and interceptors . If you wish to customize the set of available codecs or the set of active interceptors create a MediaEngine and call api . new_peer_connection instead of this function .
pub(crate) async fn new(api: &API, mut configuration: RTCConfiguration) -> Result<Self> {
        RTCPeerConnection::init_configuration(&mut configuration)?;
        let interceptor = api.interceptor_registry.build("")?;
        let (internal, configuration) =
            PeerConnectionInternal::new(api, Arc::downgrade(&interceptor), configuration).await?;
        let internal_rtcp_writer = Arc::clone(&internal) as Arc<dyn RTCPWriter + Send + Sync>;
        let interceptor_rtcp_writer = interceptor.bind_rtcp_writer(internal_rtcp_writer).await;
        // https://w3c.github.io/webrtc-pc/#constructor (Step #2)
        // Some variables defined explicitly despite their implicit zero values to
        // allow better readability to understand what is happening.
        Ok(RTCPeerConnection {
            stats_id: format!(
                "PeerConnection-{}",
                SystemTime::now()
                    .duration_since(UNIX_EPOCH)
                    .unwrap()
                    .as_nanos()
            ),
            interceptor,
            interceptor_rtcp_writer,
            internal,
            configuration,
            idp_login_url: None,
        })
    }
pub ( crate ) async fn new ( api : & API , mut configuration : RTCConfiguration ) -> Result < Self > { RTCPeerConnection :: init_configuration ( & mut configuration ) ? ; let interceptor = api . interceptor_registry . build ( " " ) ? ; let ( internal , configuration ) = PeerConnectionInternal :: new ( api , Arc :: downgrade ( & interceptor ) , configuration ) . await ? ; let internal_rtcp_writer = Arc :: clone ( & internal ) as Arc < dyn RTCPWriter + Send + Sync > ; let interceptor_rtcp_writer = interceptor . bind_rtcp_writer ( internal_rtcp_writer ) . await ; // https://w3c.github.io/webrtc-pc/#constructor (Step #2) // Some variables defined explicitly despite their implicit zero values to // allow better readability to understand what is happening. Ok ( RTCPeerConnection { stats_id : format ! ( " " SystemTime now ( ) duration_since ( UNIX_EPOCH ) unwrap ( ) as_nanos ( ) ) , interceptor , interceptor_rtcp_writer , internal , configuration , idp_login_url : None , } ) }
creates a PeerConnection with the default codecs and
interceptors.
creates a PeerConnection with the default codecs and interceptors .
api
&API
configuration
RTCConfiguration