5.8.2. Media Section Parsing
5.8.2. Media Section Parsing
Like the session-level lines, the media section lines MUST occur in the specific order and with the specific syntax defined in [RFC4566], Section 5.
The m= line itself MUST be parsed as described in [RFC4566], Section 5.14, and the <media>, <port>, <proto>, and <fmt> values stored.
Following the m= line, specific processing MUST be applied for the following non-attribute lines:
-
As with the
c=line at the session level, thec=line MUST be parsed according to [RFC4566], Section 5.7, but its value is not used. -
The
b=line, if present, MUST be parsed as specified in [RFC4566], Section 5.8, and the bwtype and bandwidth values stored.
Specific processing MUST also be applied for the following attribute lines:
-
If present, a single
a=ice-ufragline is parsed as specified in [RFC8839], Section 5.4, and the ufrag value is stored. -
If present, a single
a=ice-pwdline is parsed as specified in [RFC8839], Section 5.4, and the password value is stored. -
If present, a single
a=ice-optionsline is parsed as specified in [RFC8839], Section 5.6, and the set of specified options is stored. -
Any
a=candidateattributes MUST be parsed as specified in [RFC8839], Section 5.1, and their values stored. -
Any
a=remote-candidatesattributes MUST be parsed as specified in [RFC8839], Section 5.2, but their values are ignored. -
If present, a single
a=end-of-candidatesattribute MUST be parsed as specified in [RFC8840], Section 8.1, and its presence or absence flagged and stored. -
Any
a=fingerprintlines are parsed as specified in [RFC8122], Section 5, and the set of fingerprint and algorithm values is stored.
If the m= <proto> value indicates use of RTP, as described in Section 5.1.2, the following attribute lines MUST be processed:
-
The
m=<fmt>value MUST be parsed as specified in [RFC4566], Section 5.14, and the individual values stored. -
Any
a=rtpmapora=fmtplines MUST be parsed as specified in [RFC4566], Section 6, and their values stored. -
If present, a single
a=ptimeline MUST be parsed as described in [RFC4566], Section 6, and its value stored. -
If present, a single
a=maxptimeline MUST be parsed as described in [RFC4566], Section 6, and its value stored. -
If present, a single direction attribute line (e.g.,
a=sendrecv) MUST be parsed as described in [RFC4566], Section 6, and its value stored. -
Any
a=ssrcattributes MUST be parsed as specified in [RFC5576], Section 4.1, and their values stored. -
Any
a=extmapattributes MUST be parsed as specified in [RFC5285], Section 5, and their values stored. -
Any
a=rtcp-fbattributes MUST be parsed as specified in [RFC4585], Section 4.2, and their values stored. -
If present, a single
a=rtcp-muxattribute MUST be parsed as specified in [RFC5761], Section 5.1.3, and its presence or absence flagged and stored. -
If present, a single
a=rtcp-mux-onlyattribute MUST be parsed as specified in [RFC8858], Section 3, and its presence or absence flagged and stored. -
If present, a single
a=rtcp-rsizeattribute MUST be parsed as specified in [RFC5506], Section 5, and its presence or absence flagged and stored. -
If present, a single
a=rtcpattribute MUST be parsed as specified in [RFC3605], Section 2.1, but its value is ignored, as this information is superfluous when using ICE. -
If present,
a=msidattributes MUST be parsed as specified in [RFC8830], Section 3.2, and their values stored, ignoring anyappdatafield. If noa=msidattributes are present, a random msid-id value is generated for adefaultMediaStream for the session, if not already present, and this value is stored. -
Any
a=imageattrattributes MUST be parsed as specified in [RFC6236], Section 3, and their values stored. -
Any
a=ridlines MUST be parsed as specified in [RFC8851], Section 10, and their values stored. -
If present, a single
a=simulcastline MUST be parsed as specified in [RFC8853], and its values stored.
Otherwise, if the m= <proto> value indicates use of SCTP, the following attribute lines MUST be processed:
-
The
m=<fmt>value MUST be parsed as specified in [RFC8841], Section 4.3, and the application protocol value stored. -
An
a=sctp-portattribute MUST be present, and it MUST be parsed as specified in [RFC8841], Section 5.2, and the value stored. -
If present, a single
a=max-message-sizeattribute MUST be parsed as specified in [RFC8841], Section 6, and the value stored. Otherwise, use the specified default.
Other attributes that are not relevant to JSEP may also be present, and implementations SHOULD process any that they recognize. As required by [RFC4566], Section 5.13, unknown attribute lines MUST be ignored.