getAvailableTrackVariants

Retrieves all available track variants (such as video, audio, or text tracks) for the given content URL.

Return

Result.Success containing a map of TrackVariantInfo.Type to a list of available TrackVariantInfo for each type if successful, Result.Failure containing an Error if the operation fails.

Example usage:

val result = DownloadManager.instance?.getAvailableTrackVariants(contentUrl)
if (result is Result.Success) {
val videoVariants = result.value[TrackVariantInfo.Type.VIDEO]
// Use videoVariants as needed
}

Parameters

contentUrl

The URL of the media content.