diff --git a/lib/ex_webrtc/rtp_codec_parameters.ex b/lib/ex_webrtc/rtp_codec_parameters.ex index 6ebc25d..345f25c 100644 --- a/lib/ex_webrtc/rtp_codec_parameters.ex +++ b/lib/ex_webrtc/rtp_codec_parameters.ex @@ -5,6 +5,18 @@ defmodule ExWebRTC.RTPCodecParameters do alias ExSDP.Attribute.{FMTP, RTPMapping, RTCPFeedback} + @typedoc """ + RTP codec parameters. + + * `payload_type` - payload type used to identify the codec. + Keep in mind that the actual payload type depends on who sends the SDP offer first. + If the browser sends it first and uses a different payload type for the same codec, + Elixir WebRTC will override its settings and use the payload type provided by the browser. + If Elixir WebRTC sends the offert first and uses a different payload type for the same codec, + the browser will override its settings and use the payload type provided by Elixir WebRTC. + + For the meanings of the other fields, refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/getParameters#codecs) + """ @type t() :: %__MODULE__{ payload_type: non_neg_integer(), mime_type: binary(),