Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RTPCodecParameters docs #178

Merged
merged 2 commits into from
Dec 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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(),
Expand Down
Loading