Fix, prevent timer from 'dying' if position > duration.
This commit is contained in:
parent
34e2abf612
commit
a9630a21b5
@ -1,6 +1,6 @@
|
||||
CACHE MANIFEST
|
||||
|
||||
# 2016-02-23:v1
|
||||
# 2016-02-28:v1
|
||||
|
||||
NETWORK:
|
||||
*
|
||||
|
||||
@ -109,15 +109,14 @@ ProgressTimer.prototype._update = function(timestamp) {
|
||||
this._callback(Math.floor(position), duration, this._running);
|
||||
state.previousPosition = position;
|
||||
}
|
||||
this._scheduleUpdate(timestamp);
|
||||
} else {
|
||||
// Workaround for https://github.com/adamcik/media-progress-timer/issues/3
|
||||
// This causes the timer to die unexpectedly if the position goes
|
||||
// over the duration slightly.
|
||||
|
||||
// this._running = false;
|
||||
this._callback(duration, duration, this._running);
|
||||
}
|
||||
this._scheduleUpdate(timestamp);
|
||||
};
|
||||
|
||||
if(typeof module !== 'undefined') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user