Add support for HLS videos caching on android (#4272)
* Add support for HLS videos caching on android
This commit is contained in:
parent
de81829d73
commit
d277c5e946
@ -1161,8 +1161,14 @@ public class ReactExoplayerView extends FrameLayout implements
|
||||
throw new IllegalStateException("HLS is not enabled!");
|
||||
}
|
||||
|
||||
DataSource.Factory dataSourceFactory = mediaDataSourceFactory;
|
||||
|
||||
if (useCache) {
|
||||
dataSourceFactory = RNVSimpleCache.INSTANCE.getCacheFactory(buildHttpDataSourceFactory(true));
|
||||
}
|
||||
|
||||
mediaSourceFactory = new HlsMediaSource.Factory(
|
||||
mediaDataSourceFactory
|
||||
dataSourceFactory
|
||||
).setAllowChunklessPreparation(source.getTextTracksAllowChunklessPreparation());
|
||||
break;
|
||||
case CONTENT_TYPE_OTHER:
|
||||
|
Loading…
Reference in New Issue
Block a user