1
0
mirror of https://github.com/algora-io/tv.git synced 2025-10-30 23:07:56 +02:00

allow passing stream key as app

This commit is contained in:
ty
2024-12-16 16:51:23 -05:00
committed by zafer
parent e7f7ab7cf1
commit 8584b6234a
2 changed files with 10 additions and 6 deletions

View File

@@ -39,10 +39,6 @@ defmodule Algora.Pipeline do
end
@impl true
def handle_init(context, %{app: stream_key, stream_key: ""} = params) do
handle_init(context, %{params | stream_key: stream_key})
end
def handle_init(_context, %{app: @app, stream_key: stream_key, client_ref: client_ref}) do
Membrane.Logger.info("Starting pipeline #{@app}")

View File

@@ -1,10 +1,18 @@
defmodule Algora.Pipeline.Manager do
use GenServer
def handle_new_client(client_ref, app, stream_key) do
@app "live"
def handle_new_client(_client_ref, "", ""), do:
{__MODULE__.Abort, "Invalid stream key and app"}
def handle_new_client(client_ref, stream_key, ""), do:
handle_new_client(client_ref, @app, stream_key)
def handle_new_client(client_ref, @app, stream_key) do
params = %{
client_ref: client_ref,
app: app,
app: @app,
stream_key: stream_key,
video_uuid: nil
}