Skip to content

Commit 682c434

Browse files
themusicmanmickel8
andauthored
Add RTCP handler in the echo example (#76)
Co-authored-by: Michał Śledź <[email protected]>
1 parent 4e77274 commit 682c434

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/echo/lib/echo/peer_handler.ex

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

130+
defp handle_webrtc_msg({:rtcp, _packets}, state) do
131+
# do something with RTCP packets
132+
{:ok, state}
133+
end
134+
130135
defp handle_webrtc_msg({:rtp, id, packet}, %{in_audio_track_id: id} = state) do
131136
PeerConnection.send_rtp(state.peer_connection, state.out_audio_track_id, packet)
132137
{:ok, state}

0 commit comments

Comments
 (0)