ProgressiveMediaSource.Factory


class ProgressiveMediaSource.Factory : MediaSourceFactory


Factory for ProgressiveMediaSources.

Summary

Public constructors

Factory(dataSourceFactory: DataSource.Factory!)

Creates a new factory for ProgressiveMediaSources.

Factory(
    dataSourceFactory: DataSource.Factory!,
    extractorsFactory: ExtractorsFactory!
)

Equivalent to new Factory(dataSourceFactory, () -> new BundledExtractorsAdapter(extractorsFactory).

Factory(
    dataSourceFactory: DataSource.Factory!,
    progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!
)

Creates a new factory for ProgressiveMediaSources.

Factory(
    dataSourceFactory: DataSource.Factory!,
    progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!,
    drmSessionManagerProvider: DrmSessionManagerProvider!,
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!,
    continueLoadingCheckIntervalBytes: Int
)

Creates a new factory for ProgressiveMediaSources.

Public functions

ProgressiveMediaSource!

Returns a new ProgressiveMediaSource using the current parameters.

IntArray<Int>!

Returns the content types supported by media sources created by this factory.

ProgressiveMediaSource.Factory!
@CanIgnoreReturnValue
setContinueLoadingCheckIntervalBytes(
    continueLoadingCheckIntervalBytes: Int
)

Sets the number of bytes that should be loaded between each invocation of onContinueLoadingRequested.

ProgressiveMediaSource.Factory!

Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.

ProgressiveMediaSource.Factory!

Sets an optional LoadErrorHandlingPolicy.

Inherited functions

From androidx.media3.exoplayer.source.MediaSource.Factory
MediaSource.Factory!
@UnstableApi
experimentalParseSubtitlesDuringExtraction(
    parseSubtitlesDuringExtraction: Boolean
)

This function is deprecated.

This method (and all support for 'legacy' subtitle decoding during rendering) will be removed in a future release.

MediaSource.Factory!

Sets the CmcdConfiguration.Factory used to obtain a CmcdConfiguration for a MediaItem.

MediaSource.Factory!

Sets the SubtitleParser.Factory to be used for parsing subtitles during extraction.

Public constructors

Factory

Factory(dataSourceFactory: DataSource.Factory!)

Creates a new factory for ProgressiveMediaSources.

The factory will use the following default components:

Parameters
dataSourceFactory: DataSource.Factory!

A factory for data sources to read the media.

Factory

Factory(
    dataSourceFactory: DataSource.Factory!,
    extractorsFactory: ExtractorsFactory!
)

Equivalent to new Factory(dataSourceFactory, () -> new BundledExtractorsAdapter(extractorsFactory).

The factory will use the following default components:

Parameters
dataSourceFactory: DataSource.Factory!

A factory for data sources to read the media.

extractorsFactory: ExtractorsFactory!

A factory for the extractors used to extract the media from its container.

Factory

Factory(
    dataSourceFactory: DataSource.Factory!,
    progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!
)

Creates a new factory for ProgressiveMediaSources.

The factory will use the following default components:

Parameters
dataSourceFactory: DataSource.Factory!

A factory for data sources to read the media.

progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!

A factory for the ProgressiveMediaExtractor to extract the media from its container.

Factory

Factory(
    dataSourceFactory: DataSource.Factory!,
    progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!,
    drmSessionManagerProvider: DrmSessionManagerProvider!,
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!,
    continueLoadingCheckIntervalBytes: Int
)

Creates a new factory for ProgressiveMediaSources.

Parameters
dataSourceFactory: DataSource.Factory!

A factory for data sources to read the media.

progressiveMediaExtractorFactory: ProgressiveMediaExtractor.Factory!

A factory for the ProgressiveMediaExtractor to extract media from its container.

drmSessionManagerProvider: DrmSessionManagerProvider!

A provider to obtain a DrmSessionManager for a MediaItem.

loadErrorHandlingPolicy: LoadErrorHandlingPolicy!

A policy to handle load error.

continueLoadingCheckIntervalBytes: Int

The number of bytes that should be loaded between each invocation of onContinueLoadingRequested.

Public functions

createMediaSource

fun createMediaSource(mediaItem: MediaItem!): ProgressiveMediaSource!

Returns a new ProgressiveMediaSource using the current parameters.

Parameters
mediaItem: MediaItem!

The MediaItem.

getSupportedTypes

@C.ContentType
fun getSupportedTypes(): IntArray<Int>!

Returns the content types supported by media sources created by this factory.

setContinueLoadingCheckIntervalBytes

@CanIgnoreReturnValue
fun setContinueLoadingCheckIntervalBytes(
    continueLoadingCheckIntervalBytes: Int
): ProgressiveMediaSource.Factory!

Sets the number of bytes that should be loaded between each invocation of onContinueLoadingRequested. The default value is DEFAULT_LOADING_CHECK_INTERVAL_BYTES.

Parameters
continueLoadingCheckIntervalBytes: Int

The number of bytes that should be loaded between each invocation of onContinueLoadingRequested.

Returns
ProgressiveMediaSource.Factory!

This factory, for convenience.

setDrmSessionManagerProvider

@CanIgnoreReturnValue
fun setDrmSessionManagerProvider(
    drmSessionManagerProvider: DrmSessionManagerProvider!
): ProgressiveMediaSource.Factory!

Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.

Returns
ProgressiveMediaSource.Factory!

This factory, for convenience.

setLoadErrorHandlingPolicy

@CanIgnoreReturnValue
fun setLoadErrorHandlingPolicy(
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
): ProgressiveMediaSource.Factory!

Sets an optional LoadErrorHandlingPolicy.

Returns
ProgressiveMediaSource.Factory!

This factory, for convenience.