Skip to content

Commit 2ef1582

Browse files
authored
Improve RTPCodecParameters docs (#178)
1 parent a7a7f29 commit 2ef1582

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/ex_webrtc/rtp_codec_parameters.ex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ defmodule ExWebRTC.RTPCodecParameters do
55

66
alias ExSDP.Attribute.{FMTP, RTPMapping, RTCPFeedback}
77

8+
@typedoc """
9+
RTP codec parameters.
10+
11+
* `payload_type` - payload type used to identify the codec.
12+
Keep in mind that the actual payload type depends on who sends the SDP offer first.
13+
If the browser sends it first and uses a different payload type for the same codec,
14+
Elixir WebRTC will override its settings and use the payload type provided by the browser.
15+
If Elixir WebRTC sends the offer first and uses a different payload type for the same codec,
16+
the browser will override its settings and use the payload type provided by Elixir WebRTC.
17+
18+
For the meanings of the other fields, refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/getParameters#codecs)
19+
"""
820
@type t() :: %__MODULE__{
921
payload_type: non_neg_integer(),
1022
mime_type: binary(),

0 commit comments

Comments
 (0)