Skip to content

Commit

Permalink
Call end_of_candidates on receiving an empty ICE candidate (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 authored Feb 7, 2024
1 parent 4095ede commit 9224ab7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ex_webrtc/peer_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ defmodule ExWebRTC.PeerConnection do
{:reply, {:error, :no_remote_description}, state}
end

@impl true
def handle_call({:add_ice_candidate, %{candidate: ""}}, _from, state) do
:ok = state.ice_transport.end_of_candidates(state.ice_pid)
{:reply, :ok, state}
end

@impl true
def handle_call({:add_ice_candidate, candidate}, _from, state) do
with "candidate:" <> attr <- candidate.candidate do
Expand Down

0 comments on commit 9224ab7

Please sign in to comment.