PillarboxPreloadManager

constructor(context: Context, targetPreloadStatusControl: TargetPreloadStatusControl<Int>? = null, mediaSourceFactory: PillarboxMediaSourceFactory = PillarboxMediaSourceFactory(context), trackSelector: TrackSelector = PillarboxTrackSelector(context), bandwidthMeter: BandwidthMeter = PillarboxBandwidthMeter(context), rendererCapabilitiesListFactory: RendererCapabilitiesList.Factory = DefaultRendererCapabilitiesList.Factory( PillarboxRenderersFactory(context) ), allocator: DefaultAllocator = DefaultAllocator(false, C.DEFAULT_BUFFER_SEGMENT_SIZE), playbackThread: HandlerThread = HandlerThread("PillarboxPreloadManager:Playback", Process.THREAD_PRIORITY_AUDIO))

Parameters

context

The current Context.

targetPreloadStatusControl

The TargetPreloadStatusControl to decide when to preload an item and for how long.

mediaSourceFactory
trackSelector

The TrackSelector for this preload manager.

bandwidthMeter

The BandwidthMeter for this preload manager.

rendererCapabilitiesListFactory

The RendererCapabilitiesList.Factory for this preload manager.

playbackThread

The Thread on which the players run. Its lifecycle is handled internally by PillarboxPreloadManager.