Skip to content

Commit 695b33e

Browse files
committed
Fix some typos
1 parent f5a0198 commit 695b33e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

lib/ex_webrtc/peer_connection.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ defmodule ExWebRTC.PeerConnection do
165165
should be used for sending.
166166
167167
Once the first RTP packet is sent (via `send_rtp/4`), `set_sender_codec/3`
168-
can only be called with a codec with the clock rate.
168+
can only be called with a codec with the same clock rate.
169169
170170
Although very unlikely, keep in mind that after renegotiation,
171171
the selected codec may no longer be supported by the remote side and you might
@@ -177,6 +177,10 @@ defmodule ExWebRTC.PeerConnection do
177177
{:ok, pc} = PeerConnection.start_link()
178178
{:ok, rtp_sender} = PeerConnection.add_track(MediaStreamTrack.new(:video))
179179
180+
# exchange SDP with the remote side
181+
# {:ok, offer} = PeerConnection.create_offer(pc)
182+
# ...
183+
180184
tr =
181185
pc
182186
|> PeerConnection.get_transceivers()

lib/ex_webrtc/rtp_sender.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ defmodule ExWebRTC.RTPSender do
263263
defp rtx?(codec), do: String.ends_with?(codec.mime_type, "rtx")
264264
defp supported?(sender, codec), do: codec in sender.codecs
265265

266-
# As long as report recorder is not initialized i.e. we have not send any RTP packet
266+
# As long as report recorder is not initialized i.e. we have not sent any RTP packet
267267
# allow for codec changes. Once we start sending RTP packet, require the same clock rate.
268268
defp same_clock_rate?(%{report_recorder: %{clock_rate: nil}}, _codec), do: true
269269
defp same_clock_rate?(sender, codec), do: sender.report_recorder.clock_rate == codec.clock_rate

test/ex_webrtc/rtp_sender_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ defmodule ExWebRTC.RTPSenderTest do
4949
%{sender: sender}
5050
end
5151

52-
test "new/6" do
52+
test "new/7" do
5353
track = MediaStreamTrack.new(:video)
5454

5555
codecs = [@vp8, @av1, @av1_45khz, @rtx]

0 commit comments

Comments
 (0)