add media session integration

This commit is contained in:
Thomas Amland
2020-08-04 18:52:54 +02:00
parent c0dfb5f853
commit c7a3e98e91
7 changed files with 178 additions and 64 deletions
+3 -4
View File
@@ -97,15 +97,14 @@ export default Vue.extend({
}),
},
methods: {
...mapMutations({
...mapActions({
playPause: "player/playPause",
}),
play(index: number) {
if ((this.tracks as any)[index].id === this.playingTrackId) {
this.$store.commit("player/playPause")
return;
return this.$store.dispatch("player/playPause")
}
this.$store.dispatch('player/play', {
return this.$store.dispatch('player/playQueue', {
index,
queue: this.tracks,
})