Class DefaultDownloaderFactory
- java.lang.Object
-
- com.google.android.exoplayer2.offline.DefaultDownloaderFactory
-
- All Implemented Interfaces:
DownloaderFactory
@Deprecated public class DefaultDownloaderFactory extends Object implements DownloaderFactory
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.DefaultDownloaderFactory, supporting creation of progressive, DASH, HLS and SmoothStreaming downloaders. Note that for the latter three, the corresponding library module must be built into the application.
-
-
Constructor Summary
Constructors Constructor Description DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory)Deprecated.DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory, Executor executor)Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DownloadercreateDownloader(DownloadRequest request)Deprecated.Creates aDownloaderto perform the givenDownloadRequest.
-
-
-
Constructor Detail
-
DefaultDownloaderFactory
@Deprecated public DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory)
Deprecated.Creates an instance.- Parameters:
cacheDataSourceFactory- ACacheDataSource.Factoryfor the cache into which downloads will be written.
-
DefaultDownloaderFactory
public DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory, Executor executor)
Deprecated.Creates an instance.- Parameters:
cacheDataSourceFactory- ACacheDataSource.Factoryfor the cache into which downloads will be written.executor- AnExecutorused to download data. PassingRunnable::runwill cause each download task to download data on its own thread. Passing anExecutorthat uses multiple threads will speed up download tasks that can be split into smaller parts for parallel execution.
-
-
Method Detail
-
createDownloader
public Downloader createDownloader(DownloadRequest request)
Deprecated.Description copied from interface:DownloaderFactoryCreates aDownloaderto perform the givenDownloadRequest.- Specified by:
createDownloaderin interfaceDownloaderFactory- Parameters:
request- The download request.- Returns:
- The downloader.
-
-