提交 33993818 编写于 作者: G guoshuyu

update exoplayer 2.10.0

change exo cache api
上级 21e9a19e
......@@ -34,7 +34,7 @@ ext {
gsyVideoVersion = '7.0.1'
exo_player2 = '2.9.6'
exo_player2 = '2.10.0'
permissionsdispatcher = '4.3.0'
......
......@@ -28,6 +28,7 @@ import com.google.android.exoplayer2.upstream.cache.CacheDataSource;
import com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory;
import com.google.android.exoplayer2.upstream.cache.CacheSpan;
import com.google.android.exoplayer2.upstream.cache.CacheUtil;
import com.google.android.exoplayer2.upstream.cache.ContentMetadata;
import com.google.android.exoplayer2.upstream.cache.LeastRecentlyUsedCacheEvictor;
import com.google.android.exoplayer2.upstream.cache.SimpleCache;
import com.google.android.exoplayer2.util.Util;
......@@ -292,7 +293,7 @@ public class ExoSourceManager {
if (cachedSpans.size() == 0) {
isCache = false;
} else {
long contentLength = cache.getContentLength(key);
long contentLength = cache.getContentMetadata(key).get(ContentMetadata.KEY_CONTENT_LENGTH, C.LENGTH_UNSET);
long currentLength = 0;
for (CacheSpan cachedSpan : cachedSpans) {
currentLength += cache.getCachedLength(key, cachedSpan.position, cachedSpan.length);
......
......@@ -35,8 +35,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//api project(':gsyVideoPlayer-java')
//api project(':gsyVideoPlayer-exo_player2')
api project(':gsyVideoPlayer-java')
api project(':gsyVideoPlayer-exo_player2')
//api project(':gsyVideoPlayer-armv5')
//api project(':gsyVideoPlayer-armv7a')
//api project(':gsyVideoPlayer-armv64')
......@@ -48,8 +48,8 @@ dependencies {
//api "com.shuyu:GSYVideoPlayer:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion"
api "com.shuyu:GSYVideoPlayer-exo2:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion"
//api "com.shuyu:GSYVideoPlayer-exo2:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-armv5:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-armv7a:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-arm64:$gsyVideoVersion"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册