skip to beginning on previous

This commit is contained in:
Thomas Amland 2020-11-29 12:30:42 +01:00
parent 3e8f758ee0
commit a2c37eb4b2

View File

@ -149,7 +149,8 @@ export const playerModule: Module<State, any> = {
await audio.play() await audio.play()
}, },
async previous({ commit, state }) { async previous({ commit, state }) {
commit('setQueueIndex', state.queueIndex - 1) commit('setQueueIndex',
audio.currentTime > 3 ? state.queueIndex : state.queueIndex - 1)
commit('setPlaying') commit('setPlaying')
await audio.play() await audio.play()
}, },