Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiao committed Oct 25, 2015
1 parent 4181e8c commit 35b5180
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public interface Callback {

private boolean mInSeekingAction;

private long mDesireSeekingTime;

private long mRemainingTime;

private boolean mInSyncAction;
Expand Down Expand Up @@ -511,6 +513,7 @@ private IDrawTask createDrawTask(boolean useDrwaingCache, DanmakuTimer timer,

public void seekTo(Long ms) {
mInSeekingAction = true;
mDesireSeekingTime = ms;
removeMessages(DrawHandler.UPDATE);
removeMessages(DrawHandler.RESUME);
removeMessages(DrawHandler.SEEK_POS);
Expand Down Expand Up @@ -673,6 +676,9 @@ public IDanmakus getCurrentVisibleDanmakus() {
}

public long getCurrentTime() {
if (mInSeekingAction) {
return mDesireSeekingTime;
}
if (quitFlag || !mInWaitingState) {
return timer.currMillisecond - mRemainingTime;
}
Expand Down

0 comments on commit 35b5180

Please sign in to comment.