ExternallyLoadedMediaSource.Factory


public final class ExternallyLoadedMediaSource.Factory implements MediaSource.Factory


Factory for ExternallyLoadedMediaSource.

Summary

Public constructors

Factory(long timelineDurationUs, ExternalLoader externalLoader)

Creates an instance.

Public methods

ExternallyLoadedMediaSource

Creates a new MediaSource with the specified MediaItem.

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 methods

From androidx.media3.exoplayer.source.MediaSource.Factory
MediaSource.Factory
@UnstableApi
experimentalParseSubtitlesDuringExtraction(
    boolean parseSubtitlesDuringExtraction
)

This method 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

public Factory(long timelineDurationUs, ExternalLoader externalLoader)

Creates an instance.

Parameters
long timelineDurationUs

The duration of the SinglePeriodTimeline created, in microseconds.

ExternalLoader externalLoader

The ExternalLoader to load the media in preparation for playback.

Public methods

createMediaSource

public ExternallyLoadedMediaSource createMediaSource(MediaItem mediaItem)

Creates a new MediaSource with the specified MediaItem.

Parameters
MediaItem mediaItem

The media item to play.

getSupportedTypes

@C.ContentType
public int[] getSupportedTypes()

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

setDrmSessionManagerProvider

public MediaSource.Factory setDrmSessionManagerProvider(
    DrmSessionManagerProvider drmSessionManagerProvider
)

Does nothing. ExternallyLoadedMediaSource does not support DRM.

setLoadErrorHandlingPolicy

public MediaSource.Factory setLoadErrorHandlingPolicy(
    LoadErrorHandlingPolicy loadErrorHandlingPolicy
)

Does nothing. ExternallyLoadedMediaSource does not support error handling policies.