Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Jan 31, 2025
1 parent f5a0198 commit 695b33e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/ex_webrtc/peer_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ defmodule ExWebRTC.PeerConnection do
should be used for sending.
Once the first RTP packet is sent (via `send_rtp/4`), `set_sender_codec/3`
can only be called with a codec with the clock rate.
can only be called with a codec with the same clock rate.
Although very unlikely, keep in mind that after renegotiation,
the selected codec may no longer be supported by the remote side and you might
Expand All @@ -177,6 +177,10 @@ defmodule ExWebRTC.PeerConnection do
{:ok, pc} = PeerConnection.start_link()
{:ok, rtp_sender} = PeerConnection.add_track(MediaStreamTrack.new(:video))
# exchange SDP with the remote side
# {:ok, offer} = PeerConnection.create_offer(pc)
# ...
tr =
pc
|> PeerConnection.get_transceivers()
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_webrtc/rtp_sender.ex
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ defmodule ExWebRTC.RTPSender do
defp rtx?(codec), do: String.ends_with?(codec.mime_type, "rtx")
defp supported?(sender, codec), do: codec in sender.codecs

# As long as report recorder is not initialized i.e. we have not send any RTP packet
# As long as report recorder is not initialized i.e. we have not sent any RTP packet
# allow for codec changes. Once we start sending RTP packet, require the same clock rate.
defp same_clock_rate?(%{report_recorder: %{clock_rate: nil}}, _codec), do: true
defp same_clock_rate?(sender, codec), do: sender.report_recorder.clock_rate == codec.clock_rate
Expand Down
2 changes: 1 addition & 1 deletion test/ex_webrtc/rtp_sender_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule ExWebRTC.RTPSenderTest do
%{sender: sender}
end

test "new/6" do
test "new/7" do
track = MediaStreamTrack.new(:video)

codecs = [@vp8, @av1, @av1_45khz, @rtx]
Expand Down

0 comments on commit 695b33e

Please sign in to comment.