SRGAssetLoaderConfig

Configuration class for SRGAssetLoader.

This class allows you to customize the behavior of the asset loader, such as:

  • Providing a custom data source factory.

  • Specifying a media composition service.

  • Setting an HTTP client for network requests.

  • Injecting custom data into media item tracker data.

  • Overriding the default media metadata.

  • Providing a custom Bitmap loader for sprite sheet.

Parameters

context

The Android Context.

Functions

Link copied to clipboard
fun dataSourceFactory(dataSourceFactory: DataSource.Factory)

Sets the data source factory.

Link copied to clipboard
fun httpClient(okHttpClient: OkHttpClient)

Sets the OkHttp client used by the MediaCompositionService and AkamaiTokenProvider.

Link copied to clipboard
fun mediaCompositionService(mediaCompositionService: MediaCompositionService)

Sets the media composition service.

Link copied to clipboard

Configures the MediaMetadata that is created for the loaded asset.

Link copied to clipboard
fun spriteSheetLoader(spriteSheetLoader: SpriteSheetLoader)

Sets the SpriteSheetLoader to be used to load a Bitmap from a SpriteSheet.

Link copied to clipboard

Configures a block to inject custom data into the MutableMediaItemTrackerData used for tracking media playback.