Skip to content

Commit b48e05f

Browse files
committed
adding rtcp processing example
1 parent f96e563 commit b48e05f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

examples/echo/lib/echo/peer_handler.ex

+7
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ defmodule Echo.PeerHandler do
127127
{:ok, state}
128128
end
129129

130+
# RTCP is used for statistics and control information for media in WebRTC.
131+
# Using these packets you can get information about the quality of the media, round trip time and packet loss.
132+
defp handle_webrtc_msg({:rtcp, _packets}, state) do
133+
# do something with RTCP packets
134+
{:ok, state}
135+
end
136+
130137
defp handle_webrtc_msg({:rtp, id, packet}, %{in_audio_track_id: id} = state) do
131138
PeerConnection.send_rtp(state.peer_connection, state.out_audio_track_id, packet)
132139
{:ok, state}

0 commit comments

Comments
 (0)