Package com.brightcove.player.offline
Class MultiDataSource.Factory
- java.lang.Object
-
- com.brightcove.player.offline.MultiDataSource.Factory
-
- All Implemented Interfaces:
com.google.android.exoplayer2.upstream.DataSource.Factory
- Enclosing class:
- MultiDataSource
public static class MultiDataSource.Factory extends java.lang.Object implements com.google.android.exoplayer2.upstream.DataSource.FactoryImplements a factory to supportMultiDataSource
-
-
Constructor Summary
Constructors Constructor Description Factory(android.content.Context context, com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDataSourceFactory, com.google.android.exoplayer2.upstream.TransferListener listener)Creates a factory forMultiDataSource.Factory(android.content.Context context, com.google.android.exoplayer2.upstream.TransferListener listener)Creates a factory forMultiDataSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.android.exoplayer2.upstream.DataSourcecreateDataSource()MultiDataSource.FactorysetShortTtlHandler(MultiDataSource.ShortTtlHandler shortTtlHandler)Set theMultiDataSource.ShortTtlHandlerto be used when opening potentially expiredDataSpecs.
-
-
-
Constructor Detail
-
Factory
public Factory(@NonNull android.content.Context context, @NonNull com.google.android.exoplayer2.upstream.HttpDataSource.Factory httpDataSourceFactory, @Nullable com.google.android.exoplayer2.upstream.TransferListener listener)Creates a factory forMultiDataSource.- Parameters:
context- the context of the host application.httpDataSourceFactory- the factory that must be used for handling HTTP data source.listener- the transfer listener if any, which must be hooked to the data source.
-
Factory
public Factory(@NonNull android.content.Context context, @Nullable com.google.android.exoplayer2.upstream.TransferListener listener)Creates a factory forMultiDataSource.- Parameters:
context- the context of the host application.listener- the transfer listener if any, which must be hooked to the data source.
-
-
Method Detail
-
setShortTtlHandler
public MultiDataSource.Factory setShortTtlHandler(MultiDataSource.ShortTtlHandler shortTtlHandler)
Set theMultiDataSource.ShortTtlHandlerto be used when opening potentially expiredDataSpecs.- Parameters:
shortTtlHandler- The handler to be used when opening a HTTPDataSpec.- Returns:
- This factory instance for the chaining of method calls.
- See Also:
DataSource.open(DataSpec)
-
createDataSource
public com.google.android.exoplayer2.upstream.DataSource createDataSource()
- Specified by:
createDataSourcein interfacecom.google.android.exoplayer2.upstream.DataSource.Factory
-
-