From e6428c1ff818d76cfa495dab419b8030a4f99a9f Mon Sep 17 00:00:00 2001 From: zafer Date: Sun, 16 Jun 2024 17:37:28 +0300 Subject: [PATCH] assign unique id to each multistreamed destination --- lib/algora/pipeline.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/algora/pipeline.ex b/lib/algora/pipeline.ex index 6bdb777..e8e2b39 100644 --- a/lib/algora/pipeline.ex +++ b/lib/algora/pipeline.ex @@ -120,13 +120,13 @@ defmodule Algora.Pipeline do user = Algora.Accounts.get_user_by!(handle: "algora") destinations = Algora.Accounts.list_active_destinations(user.id) - for {destination, i} <- Enum.with_index(destinations) do + for destination <- destinations do url = URI.new!(destination.rtmp_url) |> URI.append_path("/" <> destination.stream_key) |> URI.to_string() - send(self(), {:forward_rtmp, url, String.to_atom("rtmp_sink_algora_#{i}")}) + send(self(), {:forward_rtmp, url, String.to_atom("rtmp_sink_#{destination.id}")}) end if url = Algora.Accounts.get_restream_ws_url(user) do