Avoid display quircks of duration

This commit is contained in:
Eliot Berriot 2018-02-19 20:14:14 +01:00
parent 40d33ccc77
commit 97eab8e8de
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 6 additions and 1 deletions

View File

@ -50,7 +50,12 @@ export default {
},
getters: {
durationFormatted: state => {
return time.parse(Math.round(state.duration))
let duration = parseInt(state.duration)
if (duration % 1 !== 0) {
return time.parse(0)
}
duration = Math.round(state.duration)
return time.parse(duration)
},
currentTimeFormatted: state => {
return time.parse(Math.round(state.currentTime))