API Reference¶
-
class
aioice.
Connection
(ice_controlling, components=1, stun_server=None, turn_server=None, turn_username=None, turn_password=None, turn_ssl=False, turn_transport='udp', use_ipv4=True, use_ipv6=True)¶ An ICE connection for a single media stream.
-
add_remote_candidate
(remote_candidate)¶ Add a remote candidate or signal end-of-candidates.
To signal end-of-candidates, pass None.
-
get_default_candidate
(component)¶ Gets the default local candidate for the specified component.
-
local_candidates
¶ Local candidates, automatically set by
gather_candidates()
.
-
local_password
= None¶ Local password, automatically set to a random value.
-
local_username
= None¶ Local username, automatically set to a random value.
-
remote_candidates
¶ Remote candidates, which you need to set.
Assigning this attribute will automatically signal end-of-candidates. If you will be adding more remote candidates in the future, use the
add_remote_candidate()
method instead.
-
remote_password
= None¶ Remote password, which you need to set.
-
remote_username
= None¶ Remote username, which you need to set.
-
-
class
aioice.
Candidate
(foundation, component, transport, priority, host, port, type, related_address=None, related_port=None, tcptype=None, generation=None)¶ An ICE candidate.
-
classmethod
from_sdp
(sdp)¶ Parse a
Candidate
from SDP.Candidate.from_sdp( '6815297761 1 udp 659136 1.2.3.4 31102 typ host generation 0')
-
to_sdp
()¶ Return a string representation suitable for SDP.
-
classmethod