handle streams without duration

This commit is contained in:
Thomas Amland
2020-08-23 14:47:01 +02:00
parent d80fb85484
commit 0b7d731ed4
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -118,7 +118,9 @@ export const playerModule: Module<State, any> = {
return dispatch('play')
},
seek({ commit, state }, value) {
commit('setPosition', state.duration * value)
if (isFinite(state.duration)) {
commit('setPosition', state.duration * value)
}
},
playNext({ commit }, track) {
commit('setNextInQueue', track)