Skip to content

Commit

Permalink
Improve RTPCodecParameters docs (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 authored Dec 6, 2024
1 parent a7a7f29 commit 2ef1582
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/ex_webrtc/rtp_codec_parameters.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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 offer 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(),
Expand Down

0 comments on commit 2ef1582

Please sign in to comment.