player: support toggle pause again

This commit is contained in:
Jonas Heinrich 2021-01-20 11:40:05 +01:00
parent 44e2d39252
commit 7d963e18fd

View File

@ -77,9 +77,11 @@ export default ({
if (state.isPlaying) { if (state.isPlaying) {
state.isPlaying = false state.isPlaying = false
state.isPaused = true state.isPaused = true
player.doPause()
} else { } else {
state.isPlaying = true state.isPlaying = true
state.isPaused = false state.isPaused = false
player.doResume()
} }
}, },
setTitle(state, title) { setTitle(state, title) {
@ -109,7 +111,7 @@ export default ({
context.commit('setBuffering', true) context.commit('setBuffering', true)
context.commit('setTitle', station.name) context.commit('setTitle', station.name)
context.commit('setPausing', false) context.commit('setPausing', false)
player.doPlay(station.url_resolved) player.doPlay(station.url_resolved || station.urlresolved)
}, },
}, },