Mux v1.9.0 Mux.Video.PlaybackIds View Source

This module provides functions around managing Playback IDs in Mux Video. Playback IDs are the public identifier for streaming a piece of content and can include policies such as signed or public. API Documentation.

Link to this section Summary

Functions

Create a new playback ID.

Retrieve a playback ID by ID.

Link to this section Functions

Link to this function

create(client, asset_id, params)

View Source

Create a new playback ID.

Returns {:ok, playback_id, raw_env}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, playback_id, _env} = Mux.Video.PlaybackIds.create(client, "00ecNLnqiG8v00TLqqeZ00uCE5wCAaO3kKc", %{policy: "public"})
iex> playback_id
%{id: "FRDDXsjcNgD013rx1M4CDunZ86xkq8A02hfF3b6XAa7iE", policy: "public"}
Link to this function

delete(client, asset_id, playback_id)

View Source

Delete a playback ID.

Returns {:ok, nil, raw_env}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {status, "", _env} = Mux.Video.PlaybackIds.delete(client, "00ecNLnqiG8v00TLqqeZ00uCE5wCAaO3kKc", "FRDDXsjcNgD013rx1M4CDunZ86xkq8A02hfF3b6XAa7iE")
iex> status
:ok
Link to this function

get(client, asset_id, playback_id)

View Source

Retrieve a playback ID by ID.

Returns {:ok, playback_id, raw_env}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, playback_id, _env} = Mux.Video.PlaybackIds.get(client, "00ecNLnqiG8v00TLqqeZ00uCE5wCAaO3kKc", "FRDDXsjcNgD013rx1M4CDunZ86xkq8A02hfF3b6XAa7iE")
iex> playback_id
%{id: "FRDDXsjcNgD013rx1M4CDunZ86xkq8A02hfF3b6XAa7iE", policy: "public"}