Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

离线缓存视频 第二次进入播放页报错 Another SimpleCache instance uses the folder: #132

Closed
SuitG opened this issue Jul 3, 2018 · 9 comments
Labels
Milestone

Comments

@SuitG
Copy link

SuitG commented Jul 3, 2018

07-03 17:17:06.046 14046-14046/chuangyuan.xiangjiang.yjplay E/AndroidRuntime: FATAL EXCEPTION: main
Process: chuangyuan.xiangjiang.yjplay, PID: 14046
java.lang.IllegalStateException: Another SimpleCache instance uses the folder: /storage/emulated/0/Android/data/chuangyuan.xiangjiang.yjplay/files/media
at com.google.android.exoplayer2.upstream.cache.SimpleCache.(SimpleCache.java:124)
at com.google.android.exoplayer2.upstream.cache.SimpleCache.(SimpleCache.java:111)
at com.google.android.exoplayer2.upstream.cache.SimpleCache.(SimpleCache.java:96)
at chuangyuan.ycj.videolibrary.factory.DefaultCacheDataSourceFactory.(DefaultCacheDataSourceFactory.java:74)
at chuangyuan.ycj.videolibrary.factory.DefaultCacheDataSourceFactory.(DefaultCacheDataSourceFactory.java:55)
at chuangyuan.ycj.yjplay.offline.OfficeDataSource.getDataSourceFactory(OfficeDataSource.java:32)
at chuangyuan.ycj.videolibrary.video.MediaSourceBuilder.getDataSource(MediaSourceBuilder.java:196)
at chuangyuan.ycj.videolibrary.whole.WholeMediaSource.initMediaSource(WholeMediaSource.java:57)
at chuangyuan.ycj.videolibrary.video.MediaSourceBuilder.setMediaUri(MediaSourceBuilder.java:74)
at chuangyuan.ycj.videolibrary.video.ExoUserPlayer.setPlayUri(ExoUserPlayer.java:474)
at chuangyuan.ycj.videolibrary.video.ExoUserPlayer.setPlayUri(ExoUserPlayer.java:389)
at chuangyuan.ycj.yjplay.offline.OfficeDetailedActivity$1.onClick(OfficeDetailedActivity.java:47)
at android.view.View.performClick(View.java:5673)
at android.view.View$PerformClick.run(View.java:22513)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@yangchaojiang
Copy link
Owner

demo 也是吗?

@yangchaojiang
Copy link
Owner

我测试demo ok . 你是使用之前的版本自定义缓存??

@SuitG
Copy link
Author

SuitG commented Jul 4, 2018

是的,我是直接下载的demo的代码直接运行报错的。

@yangchaojiang
Copy link
Owner

版本2.1.83已修复,谢谢反馈/

@SuitG
Copy link
Author

SuitG commented Jul 4, 2018

还有个问题,播放本地.ts文件好像无法获取到视频时长

@yangchaojiang yangchaojiang added this to the 167 milestone Aug 22, 2018
@yangchaojiang
Copy link
Owner

2.2.17 可以获取到
default
default

@helixs
Copy link

helixs commented Aug 2, 2019

我出现了这个问题。最新版OfficeDetailedActivity退出页面就会。调用ondestory

lockedCacheDirs始终没有清除。。。。

@Danniel-yan
Copy link

我出现了这个问题。最新版OfficeDetailedActivity退出页面就会。调用ondestory

lockedCacheDirs始终没有清除。。。。

请问这个返回闪退的问题怎么解决的?

@Danniel-yan
Copy link

将Demo中的CacheDataSourceFactory参数 cache抽离成单例就可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants