提交 5b8b774d 编写于 作者: S shuyu

1.3.4 优化缓冲的时间显示

上级 4be27cdd
......@@ -757,12 +757,14 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
@Override
public void onBufferingUpdate(int percent) {
if (mCurrentState != CURRENT_STATE_NORMAL && mCurrentState != CURRENT_STATE_PREPAREING) {
setTextAndProgress(percent);
if (percent != 0) {
setTextAndProgress(percent);
}
//循环清除进度
if (mLooping && percent == 0 && mProgressBar.getProgress() > 3) {
if (mLooping && mHadPlay && percent == 0 && mProgressBar.getProgress() >= (mProgressBar.getMax() - 1)) {
loopSetProgressAndTime();
}
Debuger.printfLog("Net speed: " + getNetSpeedText());
Debuger.printfLog("Net speed: " + getNetSpeedText() + " percent " + percent);
}
}
......@@ -928,9 +930,10 @@ public abstract class GSYVideoPlayer extends GSYBaseVideoPlayer implements View.
if (progress != 0) mProgressBar.setProgress(progress);
}
if (secProgress > 95) secProgress = 100;
if (secProgress != 0) mProgressBar.setSecondaryProgress(secProgress);
mCurrentTimeTextView.setText(CommonUtil.stringForTime(currentTime));
if (secProgress != 0) mProgressBar.setSecondaryProgress(progress);
mTotalTimeTextView.setText(CommonUtil.stringForTime(totalTime));
if (currentTime > 0)
mCurrentTimeTextView.setText(CommonUtil.stringForTime(currentTime));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册