ExternallyLoadedMediaSource.Factory


class ExternallyLoadedMediaSource.Factory : MediaSource.Factory


Factory for ExternallyLoadedMediaSource.

Summary

Public constructors

Factory(timelineDurationUs: Long, externalLoader: ExternalLoader!)

Creates an instance.

Public functions

ExternallyLoadedMediaSource!

Creates a new MediaSource with the specified MediaItem.

IntArray<Int>!

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

MediaSource.Factory!
setDrmSessionManagerProvider(
    drmSessionManagerProvider: DrmSessionManagerProvider!
)

Does nothing.

MediaSource.Factory!
setLoadErrorHandlingPolicy(
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
)

Does nothing.

Inherited functions

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

Sets whether subtitles should be parsed as part of extraction (before being added to the sample queue) or as part of rendering (when being taken from the sample queue).

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 if experimentalParseSubtitlesDuringExtraction is enabled.

Public constructors

Factory

Factory(timelineDurationUs: Long, externalLoader: ExternalLoader!)

Creates an instance.

Parameters
timelineDurationUs: Long

The duration of the SinglePeriodTimeline created, in microseconds.

externalLoader: ExternalLoader!

The ExternalLoader to load the media in preparation for playback.

Public functions

createMediaSource

fun createMediaSource(mediaItem: MediaItem!): ExternallyLoadedMediaSource!

Creates a new MediaSource with the specified MediaItem.

Parameters
mediaItem: MediaItem!

The media item to play.

getSupportedTypes

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

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

setDrmSessionManagerProvider

fun setDrmSessionManagerProvider(
    drmSessionManagerProvider: DrmSessionManagerProvider!
): MediaSource.Factory!

Does nothing. ExternallyLoadedMediaSource does not support DRM.

setLoadErrorHandlingPolicy

fun setLoadErrorHandlingPolicy(
    loadErrorHandlingPolicy: LoadErrorHandlingPolicy!
): MediaSource.Factory!

Does nothing. ExternallyLoadedMediaSource does not support error handling policies.