MuxWrapper.LiveStreams.get_simulcast_target

You're seeing just the function get_simulcast_target, go back to MuxWrapper.LiveStreams module for more information.
Link to this function

get_simulcast_target(client, live_stream_id, simulcast_target_id)

View Source

Specs

get_simulcast_target(
  %Tesla.Client{adapter: term(), fun: term(), post: term(), pre: term()},
  String.t(),
  String.t()
) :: tuple()

Provide a function to get simulcast target, strongly suggest read Mux doc first

Parameters

  • client: provide by client/0
  • live_stream_id: live stream id
  • simulcast_target_id: simulcast target id

Examples

iex> client = MuxWrapper.client()
%Tesla.Client{
 adapter: nil,
 fun: nil,
 post: [],
 pre: [
   {Tesla.Middleware.BaseUrl, :call, ["https://api.mux.com"]},
   {Tesla.Middleware.BasicAuth, :call,
   [
    %{
        password: "your_password",
        username: "your_username"
      }
    ]}
 ]
} 

iex> MuxWrapper.LiveStreams.get_simulcast_target(client, "stream_id_very_long", "simulcast_target_id")
{:ok, 
  %MuxWrapper.EmbeddedSchema.Simulcast{
    id: "vuOfW021mz5QA500wYEQ9SeUYvuYnpFz011mqSvski5T8claN02JN9ve2g",
    passthrough: "Example 1",
    stream_key: "abcdefgh",
    url: "rtmp://live.example1.com/app"
  }
}