MuxWrapper.LiveStreams.create_playback_id

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

create_playback_id(client, live_stream_id, params)

View Source

Specs

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

Provide a function to create a praivate playback id in Mux

## Parameters

  • client: provide by client/0
  • live_stream_id: live stream id
  • pramas - provide by MuxWrapper.EmbeddedSchema.Playback.policy_public/0 or MuxWrapper.EmbeddedSchema.Playback.policy_private/0

## Example

 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.create_playback_id(client, "stream_id_very_long", :signed)
 {:ok, 
   %MuxWrapper.EmbeddedSchema.Playback{
     id: "FRDDXsjcNgD013rx1M4CDunZ86xkq8A02hfF3b6XAa7iE",
     policy: "singed"
   }
 }