AssetLoader

abstract class AssetLoader(val mediaSourceFactory: MediaSource.Factory)

An abstract class responsible for loading an Asset from a given MediaItem.

Inheritors

Constructors

Link copied to clipboard
constructor(mediaSourceFactory: MediaSource.Factory)

Properties

Link copied to clipboard

A factory for creating MediaSource instances.

Functions

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

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

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

Loads an asset based on the provided MediaItem.