getSrc
is a utility function for parsing various types of playback information and converting them into a standardized format suitable for the Player.
Src[]
which contains essential playback information, along
with supportive metadata like thumbnails and VTT files.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.Src
objects or null
if the input is invalid or
empty.