danikula / danikula/AndroidVideoCache

Change HttpProxyCacheServerClients to OkHttp

Open
#161 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi Guy!
I'm using AndroidVideoCache with ExoPlayer version 2.4.2
When i set up url to play with your library i get the error "Error opening connection for", but when i change datasource to OkHttpClient. It work well. Can you change your HttpClient of proxy to OkHttp or make more option to change the default client.
This is my Stacktrace . I've been changed my Video Url to "....." character to protect my content.
Hope you reply soon. Thanks
HttpProxyCacheServer: HttpProxyCacheServer error
com.danikula.videocache.ProxyCacheException: Error processing request. Version: 2.7.0
at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:241)
at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52)
at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: com.danikula.videocache.ProxyCacheException: Error opening connection for http://.... with offset 221845464. Version: 2.7.0
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:75)
at com.danikula.videocache.HttpProxyCache.responseWithoutCache(HttpProxyCache.java:89)
at com.danikula.videocache.HttpProxyCache.processRequest(HttpProxyCache.java:47)
at com.danikula.videocache.HttpProxyCacheServerClients.processRequest(HttpProxyCacheServerClients.java:42)
at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:234)
at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52) 
at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841) 
Caused by: java.io.FileNotFoundException: http://.....
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:186)
at com.danikula.videocache.HttpUrlSource.open(HttpUrlSource.java:70)
at com.danikula.videocache.HttpProxyCache.responseWithoutCache(HttpProxyCache.java:89) 
at com.danikula.videocache.HttpProxyCache.processRequest(HttpProxyCache.java:47) 
at com.danikula.videocache.HttpProxyCacheServerClients.processRequest(HttpProxyCacheServerClients.java:42) 
at com.danikula.videocache.HttpProxyCacheServer.processSocket(HttpProxyCacheServer.java:234) 
at com.danikula.videocache.HttpProxyCacheServer.access$200(HttpProxyCacheServer.java:52) 
at com.danikula.videocache.HttpProxyCacheServer$SocketProcessorRunnable.run(HttpProxyCacheServer.java:338) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841) 
E/ExoPlayerImplInternal: Source error.
java.io.EOFException
at com.google.android.exoplayer2.extractor.DefaultExtractorInput.readFromDataSource(DefaultExtractorInput.java:262)
at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:98)
at com.google.android.exoplayer2.extractor.DefaultExtractorInput.skipFully(DefaultExtractorInput.java:107)
at com.google.android.exoplayer2.extractor.mkv.DefaultEbmlReader.read(DefaultEbmlReader.java:127)
at com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.read(MatroskaExtractor.java:387)
at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:652)
at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:295)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.