-
- All Implemented Interfaces:
-
com.google.android.exoplayer2.upstream.DataSource.Factory
public class MultiDataSource.Factory implements DataSource.Factory
Implements a factory to support MultiDataSource
-
-
Field Summary
Fields Modifier and Type Field Description private MultiDataSource.ShortTtlHandler
shortTtlHandler
-
Constructor Summary
Constructors Constructor Description MultiDataSource.Factory(Context context, HttpDataSource.Factory httpDataSourceFactory, TransferListener listener)
Creates a factory for MultiDataSource. MultiDataSource.Factory(Context context, TransferListener listener)
Creates a factory for MultiDataSource. MultiDataSource.Factory(Context context, HttpDataSource.Factory httpDataSourceFactory, TransferListener listener, MediaStore storeManager)
Creates a factory for MultiDataSource.
-
Method Summary
Modifier and Type Method Description MultiDataSource.Factory
setShortTtlHandler(MultiDataSource.ShortTtlHandler shortTtlHandler)
Set the ShortTtlHandler to be used when openingpotentially expired DataSpecs. DataSource
createDataSource()
-
-
Constructor Detail
-
MultiDataSource.Factory
MultiDataSource.Factory(Context context, HttpDataSource.Factory httpDataSourceFactory, TransferListener listener)
Creates a factory for MultiDataSource.- 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.
-
MultiDataSource.Factory
MultiDataSource.Factory(Context context, TransferListener listener)
Creates a factory for MultiDataSource.- Parameters:
context
- the context of the host application.listener
- the transfer listener if any, which must be hooked to the data source.
-
MultiDataSource.Factory
MultiDataSource.Factory(Context context, HttpDataSource.Factory httpDataSourceFactory, TransferListener listener, MediaStore storeManager)
Creates a factory for MultiDataSource.- 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.storeManager
- the store manager to access to downloaded content
-
-
Method Detail
-
setShortTtlHandler
MultiDataSource.Factory setShortTtlHandler(MultiDataSource.ShortTtlHandler shortTtlHandler)
Set the ShortTtlHandler to be used when openingpotentially expired DataSpecs.
- Parameters:
shortTtlHandler
- The handler to be used when opening a HTTP DataSpec.
-
createDataSource
DataSource createDataSource()
-
-
-
-