# `XMediaLib.SDP.Extmap`
[🔗](https://github.com/Lazarus404/xmedialib/blob/main/lib/sdp/types.ex#L401)

RTP header extension map (`a=extmap:`).

## What problem this solves

RTP header extensions (audio level, transport-wide CC, Dependency Descriptor)
require peers to agree on local extension ids and URIs via `a=extmap:`. This
struct stores one registered extension from SDP for SFU and browser interop.

Registers an RTP header extension id and URI (and optional direction) so
peers agree on extensions such as audio level or transport-wide sequence numbers.

Wire form: `a=extmap:<id[/direction]> <uri> [<extensionattributes>]`

## RFCs

* [RFC 8285](https://www.rfc-editor.org/rfc/rfc8285) - RTP header extensions

# `t`

```elixir
@type t() :: %XMediaLib.SDP.Extmap{
  direction: String.t() | nil,
  extension_attributes: String.t() | nil,
  id: non_neg_integer(),
  uri: String.t()
}
```

Extension id, optional direction, URI, and optional extension attributes.

## Fields

* `:id` - local extension id carried in RTP packets
* `:direction` - optional `sendrecv`, `sendonly`, `recvonly`, or `inactive`
* `:uri` - well-known extension URI
* `:extension_attributes` - optional extra tokens after the URI

---

*Consult [api-reference.md](api-reference.md) for complete listing*
