pub struct PeerConnection { /* private fields */ }Implementations§
Source§impl PeerConnection
impl PeerConnection
pub fn set_configuration( &self, config: RtcConfiguration, ) -> Result<(), Exception>
pub fn create_offer( &self, options: RtcOfferAnswerOptions, ctx: Box<PeerContext>, on_success: fn(ctx: Box<PeerContext>, sdp: UniquePtr<SessionDescription>), on_error: fn(ctx: Box<PeerContext>, error: RtcError), )
pub fn create_answer( &self, options: RtcOfferAnswerOptions, ctx: Box<PeerContext>, on_success: fn(ctx: Box<PeerContext>, sdp: UniquePtr<SessionDescription>), on_error: fn(ctx: Box<PeerContext>, error: RtcError), )
pub fn set_local_description( &self, desc: UniquePtr<SessionDescription>, ctx: Box<PeerContext>, on_complete: fn(ctx: Box<PeerContext>, error: RtcError), )
pub fn set_remote_description( &self, desc: UniquePtr<SessionDescription>, ctx: Box<PeerContext>, on_complete: fn(ctx: Box<PeerContext>, error: RtcError), )
pub fn add_track( &self, track: SharedPtr<MediaStreamTrack>, stream_ids: &Vec<String>, ) -> Result<SharedPtr<RtpSender>, Exception>
pub fn remove_track( &self, sender: SharedPtr<RtpSender>, ) -> Result<(), Exception>
pub fn get_stats( &self, ctx: Box<PeerContext>, on_stats: fn(ctx: Box<PeerContext>, json: String), )
pub fn add_transceiver( &self, track: SharedPtr<MediaStreamTrack>, init: RtpTransceiverInit, ) -> Result<SharedPtr<RtpTransceiver>, Exception>
pub fn add_transceiver_for_media( &self, media_type: MediaType, init: RtpTransceiverInit, ) -> Result<SharedPtr<RtpTransceiver>, Exception>
pub fn get_senders(&self) -> Vec<RtpSenderPtr> ⓘ
pub fn get_receivers(&self) -> Vec<RtpReceiverPtr> ⓘ
pub fn get_transceivers(&self) -> Vec<RtpTransceiverPtr> ⓘ
pub fn create_data_channel( &self, label: String, init: DataChannelInit, ) -> Result<SharedPtr<DataChannel>, Exception>
pub fn add_ice_candidate( &self, candidate: SharedPtr<IceCandidate>, ctx: Box<PeerContext>, on_complete: fn(ctx: Box<PeerContext>, error: RtcError), )
pub fn restart_ice(&self)
pub fn current_local_description(&self) -> UniquePtr<SessionDescription>
pub fn current_remote_description(&self) -> UniquePtr<SessionDescription>
pub fn connection_state(&self) -> PeerConnectionState
pub fn signaling_state(&self) -> SignalingState
pub fn ice_gathering_state(&self) -> IceGatheringState
pub fn ice_connection_state(&self) -> IceConnectionState
pub fn close(&self)
Trait Implementations§
Source§impl ExternType for PeerConnection
impl ExternType for PeerConnection
impl Send for PeerConnection
impl Sync for PeerConnection
Auto Trait Implementations§
impl !Freeze for PeerConnection
impl RefUnwindSafe for PeerConnection
impl !Unpin for PeerConnection
impl UnwindSafe for PeerConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more