From 73cafccba2964ac9d57c42ef850b341443490127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Ro=C5=BCnawski?= Date: Wed, 28 Jun 2023 10:55:37 +0200 Subject: [PATCH] Remove unused variables --- config/runtime.exs | 3 --- lib/jellyfish/room.ex | 24 +++++++----------------- mix.exs | 2 ++ 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 5848a737..f898efe6 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -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() diff --git a/lib/jellyfish/room.ex b/lib/jellyfish/room.ex index 56df5c16..dfd7da4e 100644 --- a/lib/jellyfish/room.ex +++ b/lib/jellyfish/room.ex @@ -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 diff --git a/mix.exs b/mix.exs index 4431744f..288f45ff 100644 --- a/mix.exs +++ b/mix.exs @@ -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"},