提交 07eac65c 编写于 作者: S shuyu

readme

上级 05e2a579
......@@ -101,6 +101,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
protected int mSeekToInAdvance = -1; //// TODO: 2016/11/13 跳过广告
protected int mBuffterPoint;//缓存进度
protected int mSeekTimePosition; //手动改变滑动的位置
......@@ -231,7 +232,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
HttpProxyCacheServer proxy = GSYVideoManager.getProxy(getContext().getApplicationContext(), cachePath);
url = proxy.getProxyUrl(url);
mCacheFile = (!url.startsWith("http"));
if (!mCacheFile) {
if (!mCacheFile && GSYVideoManager.instance() != null) {
proxy.registerCacheListener(GSYVideoManager.instance(), mOriginUrl);
}
}
......@@ -254,6 +255,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
cancelProgressTimer();
GSYVideoManager.instance().releaseMediaPlayer();
releasePauseCoverAndBitmap();
mBuffterPoint = 0;
}
if (mAudioManager != null) {
mAudioManager.abandonAudioFocus(onAudioFocusChangeListener);
......@@ -836,6 +838,7 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
if (mCurrentState != CURRENT_STATE_NORMAL && mCurrentState != CURRENT_STATE_PREPAREING) {
if (percent != 0) {
setTextAndProgress(percent);
mBuffterPoint = percent;
Debuger.printfLog("Net speed: " + getNetSpeedText() + " percent " + percent);
}
//循环清除进度
......@@ -1221,4 +1224,13 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
public void setSeekOnStart(long seekOnStart) {
this.mSeekOnStart = seekOnStart;
}
/**
* 缓冲进度/缓存进度
*/
public int getBuffterPoint() {
return mBuffterPoint;
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册