Compare commits

..

No commits in common. "9c544ca46a10fa8f7687dc57cab6194d180272a6" and "0494fd40cf50797a2eb9fcb4b0c7f3dabba4ff2b" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View file

@ -169,7 +169,7 @@ window.VideoElement = function(options) {
function getCurrentTime() {
var item = self.items[self.currentItem];
var currentTime = self.seeking || self.loading
? (self.currentTime - (self.options["in"] || 0))
? self.currentTime
: item ? item.position + self.video.currentTime - item['in'] - self.options["in"] : 0;
return currentTime
}

View file

@ -364,9 +364,8 @@ window.VideoPlayer = function(options) {
that.querySelector('.controls .position input').addEventListener('input', event => {
event.preventDefault()
event.stopPropagation()
const value = Math.min(100, Math.max(0, parseFloat(event.target.value))
setProgressPosition(value)
var position = value/100 * self.options.duration
setProgressPosition(event.target.value)
var position = event.target.value/100 * self.options.duration
displayTime(position)
that.currentTime(position)
hideControlsLater()
@ -387,9 +386,7 @@ window.VideoPlayer = function(options) {
if (self.options.position) {
currentTime -= self.options.position
}
let position = 100 * currentTime / duration
position = Math.min(100, Math.max(0, position))
setProgressPosition(position)
setProgressPosition(100 * currentTime / duration)
displayTime(currentTime)
})