public final class

ExternallyLoadedMediaSource.Factory

extends java.lang.Object

implements MediaSource.Factory

 java.lang.Object

↳androidx.media3.exoplayer.source.ExternallyLoadedMediaSource.Factory

Overview

Factory for ExternallyLoadedMediaSource.

Summary

Constructors
publicFactory(long timelineDurationUs, ExternalLoader externalLoader)

Creates an instance.

Methods
public ExternallyLoadedMediaSourcecreateMediaSource(MediaItem mediaItem)

public int[]getSupportedTypes()

public MediaSource.FactorysetDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)

Does nothing.

public MediaSource.FactorysetLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)

Does nothing.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Factory(long timelineDurationUs, ExternalLoader externalLoader)

Creates an instance.

Parameters:

timelineDurationUs: The duration of the SinglePeriodTimeline created, in microseconds.
externalLoader: The ExternalLoader to load the media in preparation for playback.

Methods

public MediaSource.Factory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)

Does nothing. ExternallyLoadedMediaSource does not support DRM.

public MediaSource.Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)

Does nothing. ExternallyLoadedMediaSource does not support error handling policies.

public int[] getSupportedTypes()

public ExternallyLoadedMediaSource createMediaSource(MediaItem mediaItem)