@UnstableApi
interface SsChunkSource : ChunkSource

Known direct subclasses
DefaultSsChunkSource

A default SsChunkSource implementation.


A ChunkSource for SmoothStreaming.

Summary

Nested types

Factory for SsChunkSources.

Public functions

Unit
updateManifest(newManifest: SsManifest!)

Updates the manifest.

Unit

Updates the track selection.

Inherited functions

From androidx.media3.exoplayer.source.chunk.ChunkSource
Long
getAdjustedSeekPositionUs(
    positionUs: Long,
    seekParameters: SeekParameters!
)

Adjusts a seek position given the specified SeekParameters.

Unit
getNextChunk(
    loadingInfo: LoadingInfo!,
    loadPositionUs: Long,
    queue: (Mutable)List<MediaChunk!>!,
    out: ChunkHolder!
)

Returns the next chunk to load.

Int
getPreferredQueueSize(
    playbackPositionUs: Long,
    queue: (Mutable)List<MediaChunk!>!
)

Evaluates whether MediaChunks should be removed from the back of the queue.

Unit

If the source is currently having difficulty providing chunks, then this method throws the underlying error.

Unit

Called when the ChunkSampleStream has finished loading a chunk obtained from this source.

Boolean
onChunkLoadError(
    chunk: Chunk!,
    cancelable: Boolean,
    loadErrorInfo: LoadErrorHandlingPolicy.LoadErrorInfo!,
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
)

Called when the ChunkSampleStream encounters an error loading a chunk obtained from this source.

Unit

Releases any held resources.

Boolean
shouldCancelLoad(
    playbackPositionUs: Long,
    loadingChunk: Chunk!,
    queue: (Mutable)List<MediaChunk!>!
)

Returns whether an ongoing load of a chunk should be canceled.

Public functions

updateManifest

fun updateManifest(newManifest: SsManifest!): Unit

Updates the manifest.

Parameters
newManifest: SsManifest!

The new manifest.

updateTrackSelection

fun updateTrackSelection(trackSelection: ExoTrackSelection!): Unit

Updates the track selection.

Parameters
trackSelection: ExoTrackSelection!

The new track selection instance. Must be equivalent to the previous one.