UrlAssetLoader

class UrlAssetLoader(defaultMediaSourceFactory: DefaultMediaSourceFactory) : AssetLoader

An AssetLoader implementation that loads an Asset from a URL provided in the MediaItem.

Parameters

defaultMediaSourceFactory

The DefaultMediaSourceFactory used to create a MediaSource for the player.

Constructors

Link copied to clipboard
constructor(defaultMediaSourceFactory: DefaultMediaSourceFactory)

Properties

Link copied to clipboard

A factory for creating MediaSource instances.

Functions

Link copied to clipboard
open override fun canLoadAsset(mediaItem: MediaItem): Boolean

Determines if this AssetLoader is capable of loading an Asset from the provided MediaItem.

Link copied to clipboard
open suspend override fun loadAsset(mediaItem: MediaItem): Asset

Loads an asset based on the provided MediaItem.