Closed andrews239 closed 4 years ago
RFC4145
The 'setup' attribute indicates which of the end points should
initiate the TCP connection establishment (i.e., send the initial TCP
SYN). The 'setup' attribute is charset-independent and can be a
session-level or a media-level attribute. The following is the ABNF
of the 'setup' attribute:
--- sdp.py-orig 2019-12-13 17:57:43.987661838 -0800
+++ sdp.py 2020-01-23 19:56:52.904828227 -0800
@@ -292,6 +292,7 @@
@classmethod
def parse(cls, sdp):
+ dtls_role = None
current_media = None
dtls_fingerprints = []
ice_options = None
@@ -323,6 +324,8 @@
dtls_fingerprints.append(
RTCDtlsFingerprint(algorithm=algorithm, value=fingerprint)
)
+ elif attr == "setup":
+ dtls_role = DTLS_SETUP_ROLE[value]
elif attr == "ice-options":
ice_options = value
elif attr == "group":
@@ -440,6 +443,8 @@
setattr(ssrc_info, ssrc_attr, ssrc_value)
if current_media.dtls.role is None:
+ current_media.dtls.role = dtls_role
+ if current_media.dtls.role is None:
current_media.dtls = None
# requires codecs to have been parsed
Could you please provide an actual PR, with an example of such SDP captured as a unit test?