本文整理汇总了Java中com.google.android.exoplayer2.upstream.DefaultHttpDataSource类的典型用法代码示例。如果您正苦于以下问题:Java DefaultHttpDataSource类的具体用法?Java DefaultHttpDataSource怎么用?Java DefaultHttpDataSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultHttpDataSource类属于com.google.android.exoplayer2.upstream包,在下文中一共展示了DefaultHttpDataSource类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: CustomDefaultHttpDataSourceFactory
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
public CustomDefaultHttpDataSourceFactory(String userAgent,
TransferListener<? super DataSource> listener,
boolean enableShoutcast,
PlayerCallback playerCallback) {
this(userAgent,
listener,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
false,
enableShoutcast,
playerCallback);
}
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:13,代码来源:CustomDefaultHttpDataSourceFactory.java
示例2: createDataSource
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
@Override
public DefaultHttpDataSource createDataSource() {
// toggle Shoutcast extraction
if (enableShoutcast) {
return new IcyDataSource(userAgent, null, playerCallback);
} else {
return new DefaultHttpDataSource(userAgent, null, listener, connectTimeoutMillis,
readTimeoutMillis, allowCrossProtocolRedirects, null);
}
}
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:11,代码来源:CustomDefaultHttpDataSourceFactory.java
示例3: buildHttpDataSourceFactory
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
private HttpDataSource.Factory buildHttpDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {
return new DefaultHttpDataSourceFactory(mUserAgent, bandwidthMeter,
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
true /* allowCrossProtocolRedirects */);
}
开发者ID:NiciDieNase,项目名称:chaosflix-leanback,代码行数:7,代码来源:PlayerActivity.java
示例4: buildHttpDataSourceFactory
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
private HttpDataSource.Factory buildHttpDataSourceFactory(DefaultBandwidthMeter bandwidthMeter) {
return new DefaultHttpDataSourceFactory(Util.getUserAgent(mContext, TAG), bandwidthMeter, DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS, true);
}
开发者ID:huyongli,项目名称:TigerVideo,代码行数:6,代码来源:VideoExoPlayer.java
示例5: setConnectTimeoutMillis
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
private void setConnectTimeoutMillis() {
connectTimeoutMillis = DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS;
}
开发者ID:Old-Geek,项目名称:Radio2,代码行数:4,代码来源:CustomHttpDataSource.java
示例6: setReadTimeoutMillis
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
private void setReadTimeoutMillis() {
readTimeoutMillis = DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS;
}
开发者ID:Old-Geek,项目名称:Radio2,代码行数:4,代码来源:CustomHttpDataSource.java
示例7: createDataSource
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
@Override
public DefaultHttpDataSource createDataSource() {
return new DefaultHttpDataSource(userAgent, null, listener, connectTimeoutMillis, readTimeoutMillis, allowCrossProtocolRedirects, null);
}
开发者ID:Old-Geek,项目名称:Radio2,代码行数:6,代码来源:CustomHttpDataSource.java
示例8: MyDefaultDataSource
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
/**
* Constructs a new instance, optionally configured to follow cross-protocol redirects.
*
* @param context A context.
* @param listener An optional listener.
* @param userAgent The User-Agent string that should be used when requesting remote data.
* @param connectTimeoutMillis The connection timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
* @param readTimeoutMillis The read timeout that should be used when requesting remote data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
* @param allowCrossProtocolRedirects Whether cross-protocol redirects (i.e. redirects from HTTP to HTTPS and vice versa) are enabled when fetching remote data.
*/
public MyDefaultDataSource(Context context, TransferListener<? super DataSource> listener,
String userAgent, int connectTimeoutMillis, int readTimeoutMillis,
boolean allowCrossProtocolRedirects) {
this(context, listener,
new DefaultHttpDataSource(userAgent, null, listener, connectTimeoutMillis,
readTimeoutMillis, allowCrossProtocolRedirects, null));
}
开发者ID:yangchaojiang,项目名称:yjPlay,代码行数:18,代码来源:MyDefaultDataSource.java
示例9: AitripDataSource
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource; //导入依赖的package包/类
/**
* Constructs a new instance, optionally configured to follow cross-protocol redirects.
*
* @param context A context.
* @param listener An optional listener.
* @param userAgent The User-Agent string that should be used when requesting remote data.
* @param connectTimeoutMillis The connection timeout that should be used when requesting remote
* data, in milliseconds. A timeout of zero is interpreted as an infinite timeout.
* @param readTimeoutMillis The read timeout that should be used when requesting remote data,
* in milliseconds. A timeout of zero is interpreted as an infinite timeout.
* @param allowCrossProtocolRedirects Whether cross-protocol redirects (i.e. redirects from HTTP
* to HTTPS and vice versa) are enabled when fetching remote data.
*/
public AitripDataSource(Context context, TransferListener<? super DataSource> listener,
String userAgent, int connectTimeoutMillis, int readTimeoutMillis,
boolean allowCrossProtocolRedirects) {
this(context, listener,
new DefaultHttpDataSource(userAgent, null, listener, connectTimeoutMillis,
readTimeoutMillis, allowCrossProtocolRedirects, null));
}
开发者ID:ChangWeiBa,项目名称:AesExoPlayer,代码行数:21,代码来源:AitripDataSource.java
注:本文中的com.google.android.exoplayer2.upstream.DefaultHttpDataSource类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论