PillarboxMediaSourceFactory

class PillarboxMediaSourceFactory(context: Context, timeSource: TimeSource = TimeSource.Monotonic) : MediaSource.Factory

A factory for creating PillarboxMediaSource instances.

This factory selects the first suitable AssetLoader to use for a given MediaItem by checking if AssetLoader.canLoadAsset returns true.

Parameters

context

The Context used to create the default AssetLoader.

timeSource

The TimeSource to use for the created MediaSource.

Constructors

Link copied to clipboard
constructor(context: Context, timeSource: TimeSource = TimeSource.Monotonic)

Properties

Link copied to clipboard

The default AssetLoader used to load assets when no other AssetLoader is able to handle the request.

Link copied to clipboard

The minimum duration of the live stream, in milliseconds, for it to be considered a live stream with DVR capabilities.

Link copied to clipboard
open override val supportedTypes: IntArray

Functions

Link copied to clipboard
fun addAssetLoader(assetLoader: AssetLoader)

Adds an AssetLoader.

fun addAssetLoader(index: Int, assetLoader: AssetLoader)

Adds an AssetLoader at the specified index.

Link copied to clipboard
open override fun createMediaSource(mediaItem: MediaItem): MediaSource
Link copied to clipboard
open override fun getSupportedTypes(): IntArray
Link copied to clipboard
open override fun setDrmSessionManagerProvider(drmSessionManagerProvider: DrmSessionManagerProvider): MediaSource.Factory
Link copied to clipboard
open override fun setLoadErrorHandlingPolicy(loadErrorHandlingPolicy: LoadErrorHandlingPolicy): MediaSource.Factory