Class OkHttpDataSourceFactory
- java.lang.Object
-
- com.vng.android.exoplayer2.upstream.HttpDataSource.BaseFactory
-
- com.vng.android.exoplayer2.ext.okhttp.OkHttpDataSourceFactory
-
- All Implemented Interfaces:
com.vng.android.exoplayer2.upstream.DataSource.Factory,com.vng.android.exoplayer2.upstream.HttpDataSource.Factory
public final class OkHttpDataSourceFactory extends com.vng.android.exoplayer2.upstream.HttpDataSource.BaseFactoryAHttpDataSource.Factorythat producesOkHttpDataSource.
-
-
Constructor Summary
Constructors Constructor Description OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent)OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, com.vng.android.exoplayer2.upstream.TransferListener listener)OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, com.vng.android.exoplayer2.upstream.TransferListener listener, okhttp3.CacheControl cacheControl)OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, String userAgent, okhttp3.CacheControl cacheControl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OkHttpDataSourcecreateDataSourceInternal(com.vng.android.exoplayer2.upstream.HttpDataSource.RequestProperties defaultRequestProperties)
-
-
-
Constructor Detail
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent)- Parameters:
callFactory- ACall.Factory(typically anOkHttpClient) for use by the sources created by the factory.userAgent- An optional User-Agent string.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent, @Nullable okhttp3.CacheControl cacheControl)- Parameters:
callFactory- ACall.Factory(typically anOkHttpClient) for use by the sources created by the factory.userAgent- An optional User-Agent string.cacheControl- An optionalCacheControlfor setting the Cache-Control header.
-
OkHttpDataSourceFactory
public OkHttpDataSourceFactory(okhttp3.Call.Factory callFactory, @Nullable String userAgent, @Nullable com.vng.android.exoplayer2.upstream.TransferListener listener)- Parameters:
callFactory- ACall.Factory(typically anOkHttpClient) 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 userAgent, @Nullable com.vng.android.exoplayer2.upstream.TransferListener listener, @Nullable okhttp3.CacheControl cacheControl)- Parameters:
callFactory- ACall.Factory(typically anOkHttpClient) for use by the sources created by the factory.userAgent- An optional User-Agent string.listener- An optional listener.cacheControl- An optionalCacheControlfor setting the Cache-Control header.
-
-
Method Detail
-
createDataSourceInternal
protected OkHttpDataSource createDataSourceInternal(com.vng.android.exoplayer2.upstream.HttpDataSource.RequestProperties defaultRequestProperties)
- Specified by:
createDataSourceInternalin classcom.vng.android.exoplayer2.upstream.HttpDataSource.BaseFactory
-
-