Back to Exoplayer

OkHttpDataSourceFactory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSourceFactory.html

latest7.0 KB
Original Source

Package com.google.android.exoplayer2.ext.okhttp

Class OkHttpDataSourceFactory


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classOkHttpDataSourceFactoryextends[HttpDataSource.BaseFactory](../../upstream/HttpDataSource.BaseFactory.html "class in com.google.android.exoplayer2.upstream")

Deprecated. Use OkHttpDataSource.Factory instead.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory) | Deprecated.

Creates an instance. | | OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory, String userAgent) | Deprecated.

Creates an instance. | | OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory, String userAgent, TransferListener listener) | Deprecated.

Creates an instance. | | OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory, String userAgent, TransferListener listener, okhttp3.CacheControl cacheControl) | Deprecated.

Creates an instance. | | OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory, String userAgent, okhttp3.CacheControl cacheControl) | Deprecated.

Creates an instance. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | protected OkHttpDataSource | createDataSourceInternal​(HttpDataSource.RequestProperties defaultRequestProperties) | Deprecated.

Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance. |

- 

Methods inherited from class com.google.android.exoplayer2.upstream.HttpDataSource.BaseFactory

createDataSource, setDefaultRequestProperties

- 

Methods inherited from class java.lang.Object

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

Constructor Detail

- 

OkHttpDataSourceFactory

public OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory)

Deprecated.

Creates an instance. Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.

- 

OkHttpDataSourceFactory

public OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory,
                               @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent)

Deprecated.

Creates an instance. Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.

- 

OkHttpDataSourceFactory

public OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory,
                               @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
                               @Nullable
                               okhttp3.CacheControl cacheControl)

Deprecated.

Creates an instance. Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.cacheControl - An optional CacheControl for setting the Cache-Control header.

- 

OkHttpDataSourceFactory

public OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory,
                               @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
                               @Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")listener)

Deprecated.

Creates an instance. Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.listener - An optional listener.

- 

OkHttpDataSourceFactory

public OkHttpDataSourceFactory​(okhttp3.Call.Factory callFactory,
                               @Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")userAgent,
                               @Nullable[TransferListener](../../upstream/TransferListener.html "interface in com.google.android.exoplayer2.upstream")listener,
                               @Nullable
                               okhttp3.CacheControl cacheControl)

Deprecated.

Creates an instance. Parameters:callFactory - A Call.Factory (typically an OkHttpClient) for use by the sources created by the factory.userAgent - An optional User-Agent string.listener - An optional listener.cacheControl - An optional CacheControl for setting the Cache-Control header.

Method Detail

- 

createDataSourceInternal

protected[OkHttpDataSource](OkHttpDataSource.html "class in com.google.android.exoplayer2.ext.okhttp")createDataSourceInternal​([HttpDataSource.RequestProperties](../../upstream/HttpDataSource.RequestProperties.html "class in com.google.android.exoplayer2.upstream")defaultRequestProperties)

Deprecated.

Description copied from class: HttpDataSource.BaseFactory

Called by HttpDataSource.BaseFactory.createDataSource() to create a HttpDataSource instance. Specified by:createDataSourceInternal in class HttpDataSource.BaseFactoryParameters:defaultRequestProperties - The default RequestProperties to be used by the HttpDataSource instance.Returns:A HttpDataSource instance.