Back to Exoplayer

DefaultDownloaderFactory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/offline/DefaultDownloaderFactory.html

latest5.2 KB
Original Source

Package com.google.android.exoplayer2.offline

Class DefaultDownloaderFactory

  • java.lang.Object

    • com.google.android.exoplayer2.offline.DefaultDownloaderFactory
  • All Implemented Interfaces:DownloaderFactory


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classDefaultDownloaderFactoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[DownloaderFactory](DownloaderFactory.html "interface in com.google.android.exoplayer2.offline")

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.

Default DownloaderFactory, 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. Use DefaultDownloaderFactory(CacheDataSource.Factory, Executor).

| | 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 a Downloader to perform the given DownloadRequest. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

DefaultDownloaderFactory

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public DefaultDownloaderFactory​([CacheDataSource.Factory](../upstream/cache/CacheDataSource.Factory.html "class in com.google.android.exoplayer2.upstream.cache")cacheDataSourceFactory)

Deprecated. Use DefaultDownloaderFactory(CacheDataSource.Factory, Executor).

Creates an instance. Parameters:cacheDataSourceFactory - A CacheDataSource.Factory for the cache into which downloads will be written.

- 

DefaultDownloaderFactory

public DefaultDownloaderFactory​([CacheDataSource.Factory](../upstream/cache/CacheDataSource.Factory.html "class in com.google.android.exoplayer2.upstream.cache")cacheDataSourceFactory,[Executor](https://developer.android.com/reference/java/util/concurrent/Executor.html "class or interface in java.util.concurrent")executor)

Deprecated.

Creates an instance. Parameters:cacheDataSourceFactory - A CacheDataSource.Factory for the cache into which downloads will be written.executor - An Executor used to download data. Passing Runnable::run will cause each download task to download data on its own thread. Passing an Executor that uses multiple threads will speed up download tasks that can be split into smaller parts for parallel execution.

Method Detail

- 

createDownloader

public[Downloader](Downloader.html "interface in com.google.android.exoplayer2.offline")createDownloader​([DownloadRequest](DownloadRequest.html "class in com.google.android.exoplayer2.offline")request)

Deprecated.

Description copied from interface: DownloaderFactory

Creates a Downloader to perform the given DownloadRequest. Specified by:createDownloader in interface DownloaderFactoryParameters:request - The download request.Returns:The downloader.