Class FakeMediaSourceFactory
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.FakeMediaSourceFactory
-
- All Implemented Interfaces:
MediaSource.Factory
,MediaSourceFactory
public final class FakeMediaSourceFactory extends Object implements MediaSourceFactory
FakeMediaSourceFactory
that creates aFakeMediaSource
.
-
-
Field Summary
Fields Modifier and Type Field Description static Object
DEFAULT_WINDOW_UID
The window UID used by media sources that are created by the factory.-
Fields inherited from interface com.google.android.exoplayer2.source.MediaSourceFactory
UNSUPPORTED
-
-
Constructor Summary
Constructors Constructor Description FakeMediaSourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaSource
createMediaSource(MediaItem mediaItem)
Creates a newMediaSource
with the specifiedMediaItem
.@com.google.android.exoplayer2.C.ContentType int[]
getSupportedTypes()
Returns thecontent types
supported by media sources created by this factory.MediaSourceFactory
setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)
MediaSourceFactory
setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)
Sets an optionalLoadErrorHandlingPolicy
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.source.MediaSource.Factory
setCmcdConfigurationFactory
-
-
-
-
Field Detail
-
DEFAULT_WINDOW_UID
public static final Object DEFAULT_WINDOW_UID
The window UID used by media sources that are created by the factory.
-
-
Method Detail
-
setDrmSessionManagerProvider
public MediaSourceFactory setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider)
Description copied from interface:MediaSource.Factory
- Specified by:
setDrmSessionManagerProvider
in interfaceMediaSource.Factory
- Returns:
- This factory, for convenience.
-
setLoadErrorHandlingPolicy
public MediaSourceFactory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy)
Description copied from interface:MediaSource.Factory
Sets an optionalLoadErrorHandlingPolicy
.- Specified by:
setLoadErrorHandlingPolicy
in interfaceMediaSource.Factory
- Returns:
- This factory, for convenience.
-
getSupportedTypes
@ContentType public @com.google.android.exoplayer2.C.ContentType int[] getSupportedTypes()
Description copied from interface:MediaSource.Factory
Returns thecontent types
supported by media sources created by this factory.- Specified by:
getSupportedTypes
in interfaceMediaSource.Factory
-
createMediaSource
public MediaSource createMediaSource(MediaItem mediaItem)
Description copied from interface:MediaSource.Factory
Creates a newMediaSource
with the specifiedMediaItem
.- Specified by:
createMediaSource
in interfaceMediaSource.Factory
- Parameters:
mediaItem
- The media item to play.- Returns:
- The new
media source
.
-
-