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 Downloader
createDownloader(DownloadRequest request)
Deprecated.Creates aDownloader
to perform the givenDownloadRequest
.
-
-
-
Constructor Detail
-
DefaultDownloaderFactory
@Deprecated public DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory)
Deprecated.Creates an instance.- Parameters:
cacheDataSourceFactory
- ACacheDataSource.Factory
for the cache into which downloads will be written.
-
DefaultDownloaderFactory
public DefaultDownloaderFactory(CacheDataSource.Factory cacheDataSourceFactory, Executor executor)
Deprecated.Creates an instance.- Parameters:
cacheDataSourceFactory
- ACacheDataSource.Factory
for the cache into which downloads will be written.executor
- AnExecutor
used to download data. PassingRunnable::run
will cause each download task to download data on its own thread. Passing anExecutor
that 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:DownloaderFactory
Creates aDownloader
to perform the givenDownloadRequest
.- Specified by:
createDownloader
in interfaceDownloaderFactory
- Parameters:
request
- The download request.- Returns:
- The downloader.
-
-