4

We are using Exoplayer 2.9.4 and HLS video format. When trying manually cache next video with CacheUtil's cache method, EOFException occurs, but it is working great with mp4. Probably it happens because of caching playlist file instead of video files. The question is if it is possible to use CacheUtil to cache HLS format? If no, what should we use?

Here is a test project:

https://github.com/Ortyom/ProblemHlsCacheExample/tree/master/app/src/main/java/com/example/hlscachesample

A full bug report captured from the device

com.google.android.exoplayer2.upstream.HttpDataSource$HttpDataSourceException: java.io.EOFException at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.read(DefaultHttpDataSource.java:362) at com.google.android.exoplayer2.upstream.cache.CacheDataSource.read(CacheDataSource.java:304) at com.google.android.exoplayer2.upstream.TeeDataSource.read(TeeDataSource.java:71) at com.google.android.exoplayer2.upstream.cache.CacheDataSource.read(CacheDataSource.java:304) at com.google.android.exoplayer2.upstream.cache.CacheUtil.readAndDiscard(CacheUtil.java:307) at com.google.android.exoplayer2.upstream.cache.CacheUtil.cache(CacheUtil.java:203) at com.google.android.exoplayer2.upstream.cache.CacheUtil.cache(CacheUtil.java:124) at com.example.hlscachesample.SimpleVideoPreCacher$cache$1.run(SimpleVideoPreCacher.kt:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:760) Caused by: java.io.EOFException at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.readInternal(DefaultHttpDataSource.java:700) at com.google.android.exoplayer2.upstream.DefaultHttpDataSource.read(DefaultHttpDataSource.java:360) ... 10 more

Bulat Motygullin
  • 83
  • 1
  • 1
  • 4

0 Answers0