Skip to main content

Function: getRecordingStreamUrl()

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / getRecordingStreamUrl

Function: getRecordingStreamUrl()

getRecordingStreamUrl(tokenName, recordingId, baseUrl): string

Defined in: packages/launchpad-sdk/dist/utils/assetUrls.d.ts:410

Get redirect URL for a recording HLS stream

HTTP Live Streaming (HLS) playlist for recorded video playback. Returns the master playlist (.m3u8) that references variant streams at different bitrates.

Backend: Redirects to Mux HLS master playlist for the recording.

Parameters​

tokenName​

string

Token name (lowercase)

recordingId​

string

Recording asset ID (from Mux)

baseUrl​

string

API base URL

Returns​

string

Full redirect URL to HLS playlist

Throws​

Error if token name or recording ID is invalid

Example​

const streamUrl = getRecordingStreamUrl(
'anime',
'asset_abc123',
'https://api.example.com'
);
// → "https://api.example.com/v1/tokens/anime/recordings/asset_abc123/assets/stream.m3u8"

// Use with video player
const videoElement = document.querySelector('video');
if (videoElement) {
// HLS.js or native HLS support
if (videoElement.canPlayType('application/vnd.apple.mpegurl')) {
videoElement.src = streamUrl;
} else {
// Fallback to HLS.js
}
}

Since​

7.3.0