mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 20:59:20 +02:00
Reset player position before playing previous track
This commit is contained in:
parent
876aee19cf
commit
6b8dc1b53c
4 changed files with 15 additions and 18 deletions
|
@ -31,7 +31,8 @@ export default {
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
sourceErrors: 0
|
||||
sourceErrors: 0,
|
||||
isUpdatingTime: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -99,6 +100,7 @@ export default {
|
|||
}
|
||||
},
|
||||
updateProgress: _.throttle(function () {
|
||||
this.isUpdatingTime = true
|
||||
if (this.$refs.audio) {
|
||||
this.$store.dispatch('player/updateProgress', this.$refs.audio.currentTime)
|
||||
}
|
||||
|
@ -130,6 +132,12 @@ export default {
|
|||
},
|
||||
volume: function (newValue) {
|
||||
this.$refs.audio.volume = newValue
|
||||
},
|
||||
currentTime (newValue) {
|
||||
if (!this.isUpdatingTime) {
|
||||
this.setCurrentTime(newValue)
|
||||
}
|
||||
this.isUpdatingTime = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue