PillarboxMediaSourceFactory

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

Pillarbox media source factory create a new PillarboxMediaSource from a MediaItem. It selects the first AssetLoader to use by checking if AssetLoader.canLoadAsset.

Parameters

context

to create the defaultAssetLoader.

timeSource

Constructors

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

Properties

Link copied to clipboard

Default asset loader used when no other AssetLoader has been found.

Link copied to clipboard

Minimal duration in milliseconds to consider a live with seek capabilities.

Functions

Link copied to clipboard
fun addAssetLoader(assetLoader: AssetLoader)
fun addAssetLoader(index: Int, assetLoader: AssetLoader)

Add asset loader

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