Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions examples/echo/lib/echo/peer_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ defmodule Echo.PeerHandler do

@behaviour WebSock

@ice_servers [
%{urls: "stun:stun.l.google.com:19302"}
]
# @ice_servers [
# %{urls: "stun:stun.l.google.com:19302"}
# ]

@video_codecs [
%RTPCodecParameters{
Expand All @@ -36,7 +36,10 @@ defmodule Echo.PeerHandler do
def init(_) do
{:ok, pc} =
PeerConnection.start_link(
ice_servers: @ice_servers,
ice_servers: [
%{urls: "stun:stun.nextcloud.com"}
],
transport: :tcp,
video_codecs: @video_codecs,
audio_codecs: @audio_codecs
)
Expand Down
1 change: 1 addition & 0 deletions lib/ex_webrtc/peer_connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
ice_config = [
ice_servers: config.ice_servers,
ice_transport_policy: config.ice_transport_policy,
transport: config.transport,
ip_filter: config.ice_ip_filter,
aggressive_nomination: config.ice_aggressive_nomination,
host_to_srflx_ip_mapper: config.host_to_srflx_ip_mapper,
Expand Down Expand Up @@ -845,7 +846,7 @@
|> ExSDP.add_attributes([
%ExSDP.Attribute.Group{semantics: "BUNDLE", mids: mids},
# always allow for mixing one- and two-byte RTP header extensions
# TODO ensure this was also offered

Check warning on line 849 in lib/ex_webrtc/peer_connection.ex

View workflow job for this annotation

GitHub Actions / CI on OTP 27 / Elixir 1.17

Found a TODO tag in a comment: # TODO ensure this was also offered
"extmap-allow-mixed",
{"msid-semantic", "WMS *"}
])
Expand Down
1 change: 1 addition & 0 deletions lib/ex_webrtc/peer_connection/configuration.ex
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ defmodule ExWebRTC.PeerConnection.Configuration do
[
ice_servers: [],
ice_transport_policy: :all,
transport: :udp,
ice_port_range: [0],
ice_aggressive_nomination: false,
host_to_srflx_ip_mapper: nil,
Expand Down
3 changes: 2 additions & 1 deletion lib/ex_webrtc/rtp_transceiver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ defmodule ExWebRTC.RTPTransceiver do
end

%ExSDP.Media{
ExSDP.Media.new(transceiver.kind, 9, "UDP/TLS/RTP/SAVPF", pt)
# TODO: read `transport_module.transport()` from `ice_transport` and pass it in `opts` here
ExSDP.Media.new(transceiver.kind, 9, "TCP/TLS/RTP/SAVPF", pt)
| # mline must be followed by a cline, which must contain
# the default value "IN IP4 0.0.0.0" (as there are no candidates yet)
connection_data: [%ExSDP.ConnectionData{address: {0, 0, 0, 0}}]
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule ExWebRTC.MixProject do
defp deps do
[
{:ex_sdp, "~> 1.0"},
{:ex_ice, github: "elixir-webrtc/ex_ice"},
{:ex_ice, github: "elixir-webrtc/ex_ice", branch: "tcp-ice", override: true},
{:ex_dtls, "~> 0.18.0"},
{:ex_libsrtp, "~> 0.7.1"},
{:ex_rtp, "~> 0.4.0"},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
"ex_doc": {:hex, :ex_doc, "0.38.2", "504d25eef296b4dec3b8e33e810bc8b5344d565998cd83914ffe1b8503737c02", [: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", "732f2d972e42c116a70802f9898c51b54916e542cc50968ac6980512ec90f42b"},
"ex_dtls": {:hex, :ex_dtls, "0.18.0", "0815e3384bb0c1e6c06559012479cf9a94a501ddf46c3df54dc2d1b169e29d5c", [:mix], [{:bundlex, "~> 1.5.3", [hex: :bundlex, repo: "hexpm", optional: false]}, {:unifex, "~> 1.0", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "562eda1815eeaed8360b2b5c34d4db5b453794bc096404a4c64f193fa7b18bf2"},
"ex_ice": {:git, "https://github.com/elixir-webrtc/ex_ice.git", "a4f930b19a1e92c5bbaf64e24e0035942f6ff280", []},
"ex_ice": {:git, "https://github.com/elixir-webrtc/ex_ice.git", "6cd369332479f7543fae82540c11e6dd1de7044d", [branch: "tcp-ice"]},
"ex_libsrtp": {:hex, :ex_libsrtp, "0.7.2", "211bd89c08026943ce71f3e2c0231795b99cee748808ed3ae7b97cd8d2450b6b", [:mix], [{:bunch, "~> 1.6", [hex: :bunch, repo: "hexpm", optional: false]}, {:bundlex, "~> 1.3", [hex: :bundlex, repo: "hexpm", optional: false]}, {:membrane_precompiled_dependency_provider, "~> 0.1.0", [hex: :membrane_precompiled_dependency_provider, repo: "hexpm", optional: false]}, {:unifex, "~> 1.1", [hex: :unifex, repo: "hexpm", optional: false]}], "hexpm", "2e20645d0d739a4ecdcf8d4810a0c198120c8a2f617f2b75b2e2e704d59f492a"},
"ex_rtcp": {:hex, :ex_rtcp, "0.4.0", "f9e515462a9581798ff6413583a25174cfd2101c94a2ebee871cca7639886f0a", [:mix], [], "hexpm", "28956602cf210d692fcdaf3f60ca49681634e1deb28ace41246aee61ee22dc3b"},
"ex_rtp": {:hex, :ex_rtp, "0.4.0", "1f1b5c1440a904706011e3afbb41741f5da309ce251cb986690ce9fd82636658", [:mix], [], "hexpm", "0f72d80d5953a62057270040f0f1ee6f955c08eeae82ac659c038001d7d5a790"},
Expand Down
Loading