RTCIceCandidate
ICE candidates and parameters.
- class webrtc.models.rtc_ice_candidate.RTCIceParameters(username_fragment=None, password=None, ice_lite=None)
The ICE username fragment and password of one end of an
webrtc.RTCIceTransport.
- class webrtc.models.rtc_ice_candidate.RTCIceCandidateInit(candidate='', sdp_mid=None, sdp_m_line_index=None, username_fragment=None)
A candidate as itβs signaled, for
webrtc.RTCPeerConnection.add_ice_candidate().Itβs the JSON form that
webrtc.RTCIceCandidate.to_json()returns andfrom_json()reads.See MDN: RTCIceCandidate/RTCIceCandidate.
- Parameters:
candidate (
str, optional) β The candidate-attribute from SDP. An empty string marks the end of candidates.sdp_mid (
str, optional) β Themidof the media section the candidate belongs to.sdp_m_line_index (
int, optional) β The index of the media section of the candidate.username_fragment (
str, optional) β The ICE username fragment the candidate belongs to.
- class webrtc.models.rtc_ice_candidate.RTCLocalIceCandidateInit(candidate='', sdp_mid=None, sdp_m_line_index=None, username_fragment=None, relay_protocol=None, url=None)
A candidate with the members that are only known locally.
It takes every argument of
webrtc.RTCIceCandidate.- Parameters:
candidate (
str, optional) β The candidate-attribute from SDP.sdp_mid (
str, optional) β Themidof the media section the candidate belongs to.sdp_m_line_index (
int, optional) β The index of the media section of the candidate.username_fragment (
str, optional) β The ICE username fragment the candidate belongs to.relay_protocol (
webrtc.RTCIceServerTransportProtocol, optional) β For a local relay candidate, the protocol used to reach the TURN server.url (
str, optional) β For a local server-reflexive or relay candidate, the address of the STUN or TURN server it came from.
- class webrtc.models.rtc_ice_candidate.RTCIceCandidatePair(local, remote)
The local and the remote candidate an
webrtc.RTCIceTransportsends and receives with.- Parameters:
local (
webrtc.RTCIceCandidate) β The local candidate.remote (
webrtc.RTCIceCandidate) β The remote candidate.
- class webrtc.models.rtc_ice_candidate.RTCIceCandidate(candidate='', sdp_mid=None, sdp_m_line_index=None, username_fragment=None, relay_protocol=None, url=None)
An ICE candidate, which is an address and port where a peer may be reached.
A
webrtc.RTCPeerConnectiongathers them (see itsicecandidateevent). Each one is sent to the remote peer and added there withwebrtc.RTCPeerConnection.add_ice_candidate(). The constructor doesnβt reject an unparsablecandidate, and the properties parsed from it areNonethen. Instances are immutable.See MDN: RTCIceCandidate.
- Parameters:
candidate (
str, optional) β The candidate-attribute from SDP, like'candidate:1 1 udp ...', optionally prefixed witha=. An empty string marks the end of candidates.sdp_mid (
str, optional) β Themidof the media section the candidate belongs to.sdp_m_line_index (
int, optional) β The index of the media section of the candidate.username_fragment (
str, optional) β The ICE username fragment the candidate belongs to.relay_protocol (
webrtc.RTCIceServerTransportProtocol, optional) β For a local relay candidate, the protocol used to reach the TURN server. It isnβt signaled, so itβsNonefor remote candidates.url (
str, optional) β For a local server-reflexive or relay candidate, the address of the STUN or TURN server it came from. It isnβt signaled either.
- Raises:
TypeError β If both
sdp_midandsdp_m_line_indexareNone.
- property foundation: str | None
An id shared by candidates of the same type, base address and server.
See MDN: RTCIceCandidate/foundation.
- Type:
str, optional
- property component: RTCIceComponent | None
Whether the candidate is for RTP or RTCP.
See MDN: RTCIceCandidate/component.
- Type:
webrtc.RTCIceComponent, optional
- property priority: int | None
The priority of the candidate. Higher ones are tried first.
See MDN: RTCIceCandidate/priority.
- Type:
int, optional
- property address: str | None
The IP address or host name (like an mDNS
.localone) of the candidate.Itβs
Nonefor a remote peer-reflexive candidate.See MDN: RTCIceCandidate/address.
- Type:
str, optional
- property protocol: RTCIceProtocol | None
The transport protocol of the candidate, UDP or TCP.
See MDN: RTCIceCandidate/protocol.
- Type:
webrtc.RTCIceProtocol, optional
- property port: int | None
The port of the candidate.
See MDN: RTCIceCandidate/port.
- Type:
int, optional
- property type: RTCIceCandidateType | None
host, reflexive or relay.
See MDN: RTCIceCandidate/type.
- Type:
webrtc.RTCIceCandidateType, optional- Type:
How the candidate was found
- property tcp_type: RTCIceTcpCandidateType | None
For a TCP candidate, how it opens connections.
See MDN: RTCIceCandidate/tcpType.
- Type:
webrtc.RTCIceTcpCandidateType, optional
For a candidate other than a host one, the address it was derived from.
See MDN: RTCIceCandidate/relatedAddress.
- Type:
str, optional
For a candidate other than a host one, the port it was derived from.
See MDN: RTCIceCandidate/relatedPort.
- Type:
int, optional