pub struct API { /* private fields */ }
Expand description
API bundles the global functions of the WebRTC and ORTC API. Some of these functions are also exported globally using the defaultAPI object. Note that the global version of the API may be phased out in the future.
Implementations§
source§impl API
impl API
sourcepub async fn new_peer_connection(
&self,
configuration: RTCConfiguration
) -> Result<RTCPeerConnection>
pub async fn new_peer_connection( &self, configuration: RTCConfiguration ) -> Result<RTCPeerConnection>
new_peer_connection creates a new PeerConnection with the provided configuration against the received API object
sourcepub fn new_ice_gatherer(
&self,
opts: RTCIceGatherOptions
) -> Result<RTCIceGatherer>
pub fn new_ice_gatherer( &self, opts: RTCIceGatherOptions ) -> Result<RTCIceGatherer>
new_ice_gatherer creates a new ice gatherer. This constructor is part of the ORTC API. It is not meant to be used together with the basic WebRTC API.
sourcepub fn new_ice_transport(
&self,
gatherer: Arc<RTCIceGatherer>
) -> RTCIceTransport
pub fn new_ice_transport( &self, gatherer: Arc<RTCIceGatherer> ) -> RTCIceTransport
new_ice_transport creates a new ice transport. This constructor is part of the ORTC API. It is not meant to be used together with the basic WebRTC API.
sourcepub fn new_dtls_transport(
&self,
ice_transport: Arc<RTCIceTransport>,
certificates: Vec<RTCCertificate>
) -> Result<RTCDtlsTransport>
pub fn new_dtls_transport( &self, ice_transport: Arc<RTCIceTransport>, certificates: Vec<RTCCertificate> ) -> Result<RTCDtlsTransport>
new_dtls_transport creates a new dtls_transport transport. This constructor is part of the ORTC API. It is not meant to be used together with the basic WebRTC API.
sourcepub fn new_sctp_transport(
&self,
dtls_transport: Arc<RTCDtlsTransport>
) -> Result<RTCSctpTransport>
pub fn new_sctp_transport( &self, dtls_transport: Arc<RTCDtlsTransport> ) -> Result<RTCSctpTransport>
new_sctp_transport creates a new SCTPTransport. This constructor is part of the ORTC API. It is not meant to be used together with the basic WebRTC API.
sourcepub async fn new_data_channel(
&self,
sctp_transport: Arc<RTCSctpTransport>,
params: DataChannelParameters
) -> Result<RTCDataChannel>
pub async fn new_data_channel( &self, sctp_transport: Arc<RTCSctpTransport>, params: DataChannelParameters ) -> Result<RTCDataChannel>
new_data_channel creates a new DataChannel. This constructor is part of the ORTC API. It is not meant to be used together with the basic WebRTC API.
sourcepub fn new_rtp_receiver(
&self,
kind: RTPCodecType,
transport: Arc<RTCDtlsTransport>,
interceptor: Arc<dyn Interceptor + Send + Sync>
) -> RTCRtpReceiver
pub fn new_rtp_receiver( &self, kind: RTPCodecType, transport: Arc<RTCDtlsTransport>, interceptor: Arc<dyn Interceptor + Send + Sync> ) -> RTCRtpReceiver
new_rtp_receiver constructs a new RTPReceiver
sourcepub async fn new_rtp_sender(
&self,
track: Option<Arc<dyn TrackLocal + Send + Sync>>,
transport: Arc<RTCDtlsTransport>,
interceptor: Arc<dyn Interceptor + Send + Sync>
) -> RTCRtpSender
pub async fn new_rtp_sender( &self, track: Option<Arc<dyn TrackLocal + Send + Sync>>, transport: Arc<RTCDtlsTransport>, interceptor: Arc<dyn Interceptor + Send + Sync> ) -> RTCRtpSender
new_rtp_sender constructs a new RTPSender
sourcepub fn setting_engine(&self) -> Arc<SettingEngine>
pub fn setting_engine(&self) -> Arc<SettingEngine>
Returns the internal SettingEngine
.
sourcepub fn media_engine(&self) -> Arc<MediaEngine>
pub fn media_engine(&self) -> Arc<MediaEngine>
Returns the internal MediaEngine
.