Features
- Supports inputs like Livepeer playback info, Cloudflare stream data, Mux URLs,
arrays of strings, and single strings
- Transforms into
Src[] which contains essential playback information, along
with supportive metadata like thumbnails and VTT files.
Functionality
The function can process the following input types:
LivepeerPlaybackInfo: Extracts the ‘source’ array from its ‘meta’ property
from the playback info endpoint.
LivepeerSource or LivepeerSource[]: Uses the source object(s) directly.
CloudflareStreamData: Retrieves the stream data from a Cloudflare stream
data object.
string[]: Assumes each string as a URL and creates an array of Source
objects.
string: Assumes the string is a URL and creates a single Source object.
The output is an array of Src objects or null if the input is invalid or
empty. Last modified on June 2, 2026