Trait script::dom::bindings::codegen::Bindings::RTCPeerConnectionBinding::RTCPeerConnection_Binding::RTCPeerConnectionMethods
source · pub trait RTCPeerConnectionMethods {
Show 29 methods
// Required methods
fn CreateOffer(
&self,
options: &RTCOfferOptions,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn CreateAnswer(
&self,
options: &RTCAnswerOptions,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn SetLocalDescription(
&self,
description: &RTCSessionDescriptionInit,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn GetLocalDescription(&self) -> Option<Root<Dom<RTCSessionDescription>>>;
fn SetRemoteDescription(
&self,
description: &RTCSessionDescriptionInit,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn GetRemoteDescription(&self) -> Option<Root<Dom<RTCSessionDescription>>>;
fn AddIceCandidate(
&self,
candidate: &RTCIceCandidateInit,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn SignalingState(&self) -> RTCSignalingState;
fn IceGatheringState(&self) -> RTCIceGatheringState;
fn IceConnectionState(&self) -> RTCIceConnectionState;
fn Close(&self, _can_gc: CanGc);
fn GetOnnegotiationneeded(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnnegotiationneeded(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnicecandidate(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnicecandidate(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnsignalingstatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnsignalingstatechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOniceconnectionstatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOniceconnectionstatechange(
&self,
value: Option<Rc<EventHandlerNonNull>>,
);
fn GetOnicegatheringstatechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnicegatheringstatechange(
&self,
value: Option<Rc<EventHandlerNonNull>>,
);
fn AddStream(&self, stream: &MediaStream);
fn AddTransceiver(
&self,
trackOrKind: MediaStreamTrackOrString,
init: &RTCRtpTransceiverInit,
) -> Root<Dom<RTCRtpTransceiver>>;
fn GetOntrack(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntrack(&self, value: Option<Rc<EventHandlerNonNull>>);
fn CreateDataChannel(
&self,
label: USVString,
dataChannelDict: &RTCDataChannelInit,
) -> Root<Dom<RTCDataChannel>>;
fn GetOndatachannel(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndatachannel(&self, value: Option<Rc<EventHandlerNonNull>>);
fn Constructor(
global: &Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
configuration: &RTCConfiguration,
) -> Result<Root<Dom<RTCPeerConnection>>, Error>;
}
Required Methods§
fn CreateOffer( &self, options: &RTCOfferOptions, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn CreateAnswer( &self, options: &RTCAnswerOptions, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn SetLocalDescription( &self, description: &RTCSessionDescriptionInit, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn GetLocalDescription(&self) -> Option<Root<Dom<RTCSessionDescription>>>
fn SetRemoteDescription( &self, description: &RTCSessionDescriptionInit, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn GetRemoteDescription(&self) -> Option<Root<Dom<RTCSessionDescription>>>
fn AddIceCandidate( &self, candidate: &RTCIceCandidateInit, _comp: InRealm<'_>, _can_gc: CanGc, ) -> Rc<Promise>
fn SignalingState(&self) -> RTCSignalingState
fn IceGatheringState(&self) -> RTCIceGatheringState
fn IceConnectionState(&self) -> RTCIceConnectionState
fn Close(&self, _can_gc: CanGc)
fn GetOnnegotiationneeded(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnnegotiationneeded(&self, value: Option<Rc<EventHandlerNonNull>>)
fn GetOnicecandidate(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnicecandidate(&self, value: Option<Rc<EventHandlerNonNull>>)
fn GetOnsignalingstatechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnsignalingstatechange(&self, value: Option<Rc<EventHandlerNonNull>>)
fn GetOniceconnectionstatechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOniceconnectionstatechange(&self, value: Option<Rc<EventHandlerNonNull>>)
fn GetOnicegatheringstatechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnicegatheringstatechange(&self, value: Option<Rc<EventHandlerNonNull>>)
fn AddStream(&self, stream: &MediaStream)
fn AddTransceiver( &self, trackOrKind: MediaStreamTrackOrString, init: &RTCRtpTransceiverInit, ) -> Root<Dom<RTCRtpTransceiver>>
fn GetOntrack(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntrack(&self, value: Option<Rc<EventHandlerNonNull>>)
fn CreateDataChannel( &self, label: USVString, dataChannelDict: &RTCDataChannelInit, ) -> Root<Dom<RTCDataChannel>>
fn GetOndatachannel(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndatachannel(&self, value: Option<Rc<EventHandlerNonNull>>)
fn Constructor( global: &Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, configuration: &RTCConfiguration, ) -> Result<Root<Dom<RTCPeerConnection>>, Error>
Object Safety§
This trait is not object safe.