Skip to content

Commit 0d4a07e

Browse files
committed
Delegate ICE get_stats to ExICE.ICEAgent.get_stats/2
Uses the new timeout param from ex_ice (elixir-webrtc/ex_ice#108) instead of calling into the ICE agent's GenServer directly. Temporarily depends on the ex_ice branch until 0.16.1 is on hex.
1 parent 2d7de2b commit 0d4a07e

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/ex_webrtc/ice_transport.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ defmodule ExWebRTC.DefaultICETransport do
5757
@impl true
5858
defdelegate set_remote_credentials(pid, ufrag, pwd), to: ICEAgent
5959
@impl true
60-
def get_stats(pid, timeout), do: GenServer.call(pid, :get_stats, timeout)
60+
defdelegate get_stats(pid, timeout), to: ICEAgent
6161
@impl true
6262
defdelegate close(pid), to: ICEAgent
6363
@impl true

mix.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ defmodule ExWebRTC.MixProject do
6262
defp deps do
6363
[
6464
{:ex_sdp, "~> 1.1"},
65-
{:ex_ice, "~> 0.16.0"},
65+
# TODO: switch back to {:ex_ice, "~> 0.16.1"} once it's released on hex
66+
{:ex_ice, github: "elixir-webrtc/ex_ice", branch: "ice-agent-get-stats-timeout"},
6667
{:ex_dtls, "~> 0.18.1"},
6768
{:ex_libsrtp, "~> 0.7.1"},
6869
{:ex_rtp, "~> 0.4.1"},

mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"erlex": {:hex, :erlex, "0.2.9", "7debbbaa9f4f368b8cd648983e0f1d7963028508e9c59e9d4ed504e94ef52a55", [:mix], [], "hexpm", "8cfffc0ec7159e6d73de2ab28a588064de80f88b2798d5cbe4482cbbc200178b"},
1313
"ex_doc": {:hex, :ex_doc, "0.40.3", "4a972ffe64bc07dc605af487e98fc19b72a4185f55ca031b94c0552d6071c1d9", [:mix], [{:earmark_parser, "~> 1.4.44", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "2756e357742fecd9749b489b85d67c9ce99c465f2e75728d9e6dc8d704b973de"},
1414
"ex_dtls": {:hex, :ex_dtls, "0.18.1", "12bc418e6f25b0194affb988c8755f4c9a3dbacf9a9ef76c87cd4b5ee0133f8b", [:mix], [{:bundlex, "~> 1.5.3", [hex: :bundlex, repo: "hexpm", optional: false]}, {:unifex, "~> 1.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "02aa48094982d231043cce4b02e6f2c6cfafc7e308c4afe116785641f92f0a56"},
15-
"ex_ice": {:hex, :ex_ice, "0.16.0", "393652beb19f06d23cc8701045cd8cf57bf48c5b6a6b46ef876cd1964fcb0707", [:mix], [{:elixir_uuid, "~> 1.0", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:ex_stun, "~> 0.2.1", [hex: :ex_stun, repo: "hexpm", optional: false]}, {:ex_turn, "~> 0.2.3", [hex: :ex_turn, repo: "hexpm", optional: false]}], "hexpm", "3ca60f1845f9cbb58265e7d74d0b9d203d9cc9e83a30d96cba7b2beb8d095653"},
15+
"ex_ice": {:git, "https://github.com/elixir-webrtc/ex_ice.git", "bef65e0808de5498b63f504edf5778365f50719d", [branch: "ice-agent-get-stats-timeout"]},
1616
"ex_libsrtp": {:hex, :ex_libsrtp, "0.7.3", "f0a0dcb6c6518986c61a01ff47e99d71ff6eeef8108a207d92e3ab8a3687b435", [:mix], [{:bunch, "~> 1.6", [hex: :bunch, repo: "hexpm", optional: false]}, {:bundlex, "~> 1.3", [hex: :bundlex, repo: "hexpm", optional: false]}, {:membrane_precompiled_dependency_provider, "~> 0.2.1", [hex: :membrane_precompiled_dependency_provider, repo: "hexpm", optional: false]}, {:unifex, "~> 1.1", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "0964a9ad35f4aa871a472fa827cfef8dcd3cbf22c912a32bc7b19a8769fbc744"},
1717
"ex_rtcp": {:hex, :ex_rtcp, "0.4.2", "ce723c86e73dc766540a19c9301be673fa0f9fea8843d8d84cdff24bb7111151", [:mix], [], "hexpm", "d1532d561ec6f8686ff73f96d269d015e5ed150e5816b358deddcdf61ddc1f8e"},
1818
"ex_rtp": {:hex, :ex_rtp, "0.4.1", "878349aaa9c7e525ce2b9a277b5cee9fc247111c3954981111c391e0dcfdd4a0", [:mix], [], "hexpm", "3bc7d426adfa1f6b7c735bbf20fcf8688808d6531ab9616641ee156d11877703"},

0 commit comments

Comments
 (0)