General-purpose SDP parser. See RFC 8866 for the SDP specification.
Only parse/1
is exposed; this expects to receive the full header data with
lines delimited by CRLF, and returns an object representing the session
description. Since this is a parser only, any stipulations imposed by the
RFC regarding server state (such as uniqueness of session IDs) CANNOT be
enforced by the parser and MUST be validated by the service after a
successful parse.
- The parser was implemented based on the ABNF provided in the RFC; this means that most of the additional guidance provided has not been implemented.
- The following fields are currently not validated beyond string population:
- Protocol names
- Email addresses
- All attribute (
a=
) fields