Closed ndrean closed 3 weeks ago
https://github.com/elixir-webrtc/ex_webrtc/blob/cbfdc56b5d3b8f2e62cfbc832786fdd653827a16/lib/ex_webrtc/peer_connection.ex#L982
This callback is said to be refactored. However, as it is, you don't get what you want if the find is nil.
nil
If you change to this, you get your message.
def handle_cast({:send_rtp, track_id, packet, opts}, state) do rtx? = Keyword.get(opts, :rtx?, false) state.transceivers |> Stream.with_index() |> Enum.find(fn {%{sender: %{track: %{id: id}}}, _idx} -> id == track_id _ -> false end) |> case do nil -> Logger.warning( "Attempted to send packet to track with unrecognized id: #{inspect(track_id)}" ) {transceiver, idx} -> {packet, state} = case Map.fetch(...)
Yeah, you're right. Do you want to open a PR?
https://github.com/elixir-webrtc/ex_webrtc/blob/cbfdc56b5d3b8f2e62cfbc832786fdd653827a16/lib/ex_webrtc/peer_connection.ex#L982
This callback is said to be refactored. However, as it is, you don't get what you want if the find is
nil
.If you change to this, you get your message.