docs/doc/reference/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.Factory.html
Package com.google.android.exoplayer2.ext.ima
All Implemented Interfaces:MediaSource.FactoryEnclosing class:ImaServerSideAdInsertionMediaSource
public static final classImaServerSideAdInsertionMediaSource.Factoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MediaSource.Factory](../../source/MediaSource.Factory.html "interface in com.google.android.exoplayer2.source")
Factory for creating ImaServerSideAdInsertionMediaSources.
Apps can use the ImaServerSideAdInsertionMediaSource.Factory to customized the DefaultMediaSourceFactory that is used to build a player:
-
UNSUPPORTED
Constructors | Constructor | Description |
| --- | --- |
| Factory(ImaServerSideAdInsertionMediaSource.AdsLoader adsLoader, MediaSource.Factory contentMediaSourceFactory) |
Creates a new factory for ImaServerSideAdInsertionMediaSources.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| MediaSource | createMediaSource(MediaItem mediaItem) |
Creates a new MediaSource with the specified MediaItem.
|
| @com.google.android.exoplayer2.C.ContentType int[] | getSupportedTypes() |
Returns the content types supported by media sources created by this factory.
|
| MediaSource.Factory | setDrmSessionManagerProvider(DrmSessionManagerProvider drmSessionManagerProvider) |
Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.
|
| MediaSource.Factory | setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) |
Sets an optional LoadErrorHandlingPolicy.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
setCmcdConfigurationFactory
-
public Factory([ImaServerSideAdInsertionMediaSource.AdsLoader](ImaServerSideAdInsertionMediaSource.AdsLoader.html "class in com.google.android.exoplayer2.ext.ima")adsLoader,[MediaSource.Factory](../../source/MediaSource.Factory.html "interface in com.google.android.exoplayer2.source")contentMediaSourceFactory)
Creates a new factory for ImaServerSideAdInsertionMediaSources.
Parameters:adsLoader - The ImaServerSideAdInsertionMediaSource.AdsLoader.contentMediaSourceFactory - The content media source factory to create content sources.
-
@CanIgnoreReturnValue
public[MediaSource.Factory](../../source/MediaSource.Factory.html "interface in com.google.android.exoplayer2.source")setLoadErrorHandlingPolicy([LoadErrorHandlingPolicy](../../upstream/LoadErrorHandlingPolicy.html "interface in com.google.android.exoplayer2.upstream")loadErrorHandlingPolicy)
Description copied from interface: MediaSource.Factory
Sets an optional LoadErrorHandlingPolicy.
Specified by:setLoadErrorHandlingPolicy in interface MediaSource.FactoryReturns:This factory, for convenience.
-
@CanIgnoreReturnValue
public[MediaSource.Factory](../../source/MediaSource.Factory.html "interface in com.google.android.exoplayer2.source")setDrmSessionManagerProvider([DrmSessionManagerProvider](../../drm/DrmSessionManagerProvider.html "interface in com.google.android.exoplayer2.drm")drmSessionManagerProvider)
Description copied from interface: MediaSource.Factory
Sets the DrmSessionManagerProvider used to obtain a DrmSessionManager for a MediaItem.
Specified by:setDrmSessionManagerProvider in interface MediaSource.FactoryReturns:This factory, for convenience.
-
[@ContentType](../../C.ContentType.html "annotation in com.google.android.exoplayer2")public @com.google.android.exoplayer2.C.ContentType int[] getSupportedTypes()
Description copied from interface: MediaSource.Factory
Returns the content types supported by media sources created by this factory.
Specified by:getSupportedTypes in interface MediaSource.Factory
-
public[MediaSource](../../source/MediaSource.html "interface in com.google.android.exoplayer2.source")createMediaSource([MediaItem](../../MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Description copied from interface: MediaSource.Factory
Creates a new MediaSource with the specified MediaItem.
Specified by:createMediaSource in interface MediaSource.FactoryParameters:mediaItem - The media item to play.Returns:The new media source.