Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
roznawsk committed Jun 28, 2023
1 parent 05e9422 commit 73cafcc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
3 changes: 0 additions & 3 deletions config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ config :jellyfish,
integrated_turn_tcp_port:
System.get_env("INTEGRATED_TURN_TCP_PORT")
|> ConfigParser.parse_port_number("INTEGRATED_TURN_TCP_PORT"),
integrated_turn_pkey: System.get_env("INTEGRATED_TURN_PKEY"),
integrated_turn_cert: System.get_env("INTEGRATED_TURN_CERT"),
integrated_turn_domain: System.get_env("VIRTUAL_HOST"),
jwt_max_age: 24 * 3600,
output_base_path: System.get_env("OUTPUT_BASE_PATH", "jellyfish_output") |> Path.expand()

Expand Down
24 changes: 7 additions & 17 deletions lib/jellyfish/room.ex
Original file line number Diff line number Diff line change
Expand Up @@ -311,41 +311,31 @@ defmodule Jellyfish.Room do
Engine.register(pid, self())
Process.monitor(pid)

network_options =
integrated_turn_options =
if Application.fetch_env!(:jellyfish, :webrtc_used) do
turn_ip = Application.fetch_env!(:jellyfish, :integrated_turn_listen_ip)
turn_mock_ip = Application.fetch_env!(:jellyfish, :integrated_turn_ip)

integrated_turn_options = [
[
ip: turn_ip,
mock_ip: turn_mock_ip,
ports_range: Application.fetch_env!(:jellyfish, :integrated_turn_port_range),
cert_file: nil
]

[
integrated_turn_options: integrated_turn_options,
integrated_turn_domain: Application.fetch_env!(:jellyfish, :integrated_turn_domain)
ports_range: Application.fetch_env!(:jellyfish, :integrated_turn_port_range)
]
else
[]
end

case Application.fetch_env!(:jellyfish, :integrated_turn_tcp_port) do
nil ->
:pass
tcp_turn_port = Application.fetch_env!(:jellyfish, :integrated_turn_tcp_port)

tcp_turn_port ->
TURNManager.ensure_tcp_turn_launched(network_options[:integrated_turn_options],
port: tcp_turn_port
)
if tcp_turn_port do
TURNManager.ensure_tcp_turn_launched(integrated_turn_options, port: tcp_turn_port)
end

%__MODULE__{
id: id,
config: %{max_peers: max_peers},
engine_pid: pid,
network_options: network_options
network_options: [integrated_turn_options: integrated_turn_options]
}
end

Expand Down
2 changes: 2 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ defmodule Jellyfish.MixProject do
{:cors_plug, "~> 3.0"},
{:open_api_spex, "~> 3.16"},
{:ymlr, "~> 3.0"},

# protobuf deps
{:protobuf, "~> 0.10.0"},

# Membrane deps
{:membrane_rtc_engine, "~> 0.14.0"},
{:membrane_ice_plugin, "~> 0.15.0"},

# HLS endpoints deps
{:membrane_aac_plugin, "~> 0.13.0"},
Expand Down

0 comments on commit 73cafcc

Please sign in to comment.