ExWebRTC.RTPCodecParameters (ex_webrtc v0.11.0)

View Source

Implementation of the RTCRtpCodecParameters.

Summary

Types

t()

RTP codec parameters.

Types

t()

@type t() :: %ExWebRTC.RTPCodecParameters{
  channels: non_neg_integer() | nil,
  clock_rate: non_neg_integer(),
  mime_type: binary(),
  payload_type: non_neg_integer(),
  rtcp_fbs: [ExSDP.Attribute.RTCPFeedback.t()],
  sdp_fmtp_line: ExSDP.Attribute.FMTP.t() | nil
}

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

Functions

new(type, rtp_mapping, fmtp, rtcp_fbs)

@spec new(
  :audio | :video,
  ExSDP.Attribute.RTPMapping.t(),
  ExSDP.Attribute.FMTP.t() | nil,
  [
    ExSDP.Attribute.RTCPFeedback.t()
  ]
) :: t()