Struct webrtc::api::API

source ·
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

source

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

source

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.

source

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.

source

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.

source

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.

source

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.

source

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

source

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

source

pub fn setting_engine(&self) -> Arc<SettingEngine>

Returns the internal SettingEngine.

source

pub fn media_engine(&self) -> Arc<MediaEngine>

Returns the internal MediaEngine.

Auto Trait Implementations§

§

impl !RefUnwindSafe for API

§

impl Send for API

§

impl Sync for API

§

impl Unpin for API

§

impl !UnwindSafe for API

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V