Skip to main content

index/functions/getRecordingAnimatedUrl.md

getRecordingAnimatedUrl(tokenName, recordingId, baseUrl, extension?): string

Get redirect URL for a recording animated asset

Animated version of a recording (e.g., GIF preview of recording).

Backend: Redirects to Mux animated asset if available, otherwise placeholder.

Parameters​

ParameterTypeDescription
tokenNamestringToken name (lowercase)
recordingIdstringRecording asset ID (from Mux)
baseUrlstringAPI base URL
extension?stringFile extension (optional, default: 'gif')

Returns​

string

Full redirect URL to animated recording

Throws​

Error if token name or recording ID is invalid

Example​

const animUrl = getRecordingAnimatedUrl(
'anime',
'asset_abc123',
'https://api.example.com',
'webp'
);
// → "https://api.example.com/v1/tokens/anime/recordings/asset_abc123/assets/animated.webp"

Since​

7.3.0