PillarboxLoadControl

class PillarboxLoadControl(bufferDurations: PillarboxLoadControl.BufferDurations = DEFAULT_BUFFER_DURATIONS, allocator: DefaultAllocator = DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE)) : LoadControl

A LoadControl implementation tailored for Pillarbox, optimizing content loading.

Parameters

bufferDurations

Buffer durations to customize the internal DefaultLoadControl's behavior.

allocator

The DefaultAllocator to use in the internal DefaultLoadControl.

Constructors

Link copied to clipboard
constructor(bufferDurations: PillarboxLoadControl.BufferDurations = DEFAULT_BUFFER_DURATIONS, allocator: DefaultAllocator = DefaultAllocator(true, C.DEFAULT_BUFFER_SEGMENT_SIZE))

Types

Link copied to clipboard
data class BufferDurations(val minBufferDuration: Duration = DefaultLoadControl.DEFAULT_MIN_BUFFER_MS.milliseconds, val maxBufferDuration: Duration = DefaultLoadControl.DEFAULT_MAX_BUFFER_MS.milliseconds, val bufferForPlayback: Duration = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_MS.milliseconds, val bufferForPlaybackAfterRebuffer: Duration = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS.milliseconds)

Represents the buffer durations used by DefaultLoadControl.Builder.setBufferDurationsMs.

Properties

Link copied to clipboard
open override val allocator: Allocator
Link copied to clipboard

Functions

Link copied to clipboard
open override fun getAllocator(): Allocator
Link copied to clipboard
open override fun getBackBufferDurationUs(playerId: PlayerId): Long
Link copied to clipboard
open fun onPrepared()
open override fun onPrepared(playerId: PlayerId)
Link copied to clipboard
open fun onReleased()
open override fun onReleased(playerId: PlayerId)
Link copied to clipboard
open fun onStopped()
open override fun onStopped(playerId: PlayerId)
Link copied to clipboard
Link copied to clipboard
open fun shouldContinueLoading(p0: Long, p1: Long, p2: Float): Boolean
open override fun shouldContinueLoading(parameters: LoadControl.Parameters): Boolean
Link copied to clipboard
open override fun shouldContinuePreloading(timeline: Timeline, mediaPeriodId: MediaSource.MediaPeriodId, bufferedDurationUs: Long): Boolean
Link copied to clipboard
open fun shouldStartPlayback(p0: Long, p1: Float, p2: Boolean, p3: Long): Boolean
open override fun shouldStartPlayback(parameters: LoadControl.Parameters): Boolean