WIP - Sound.file instead of Sound.path; fix issues with player; program.path is now relative
This commit is contained in:
@ -219,7 +219,7 @@ export default {
|
||||
|
||||
/// Push items to playlist (by name)
|
||||
push(playlist, ...items) {
|
||||
return this.$refs[playlist].push(...items);
|
||||
return this.sets[playlist].push(...items);
|
||||
},
|
||||
|
||||
/// Push and play items
|
||||
|
@ -6,7 +6,7 @@
|
||||
:key="index">
|
||||
<a :class="index == selectedIndex ? 'is-active' : ''">
|
||||
<ASoundItem
|
||||
:data="item" :index="index" :player="player" :set="set"
|
||||
:data="item" :index="index" :set="set" :player="player_"
|
||||
@togglePlay="togglePlay(index)"
|
||||
:actions="actions">
|
||||
<template v-slot:actions="{}">
|
||||
@ -38,7 +38,8 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
self() { return this; }
|
||||
self() { return this; },
|
||||
player_() { return this.player || window.aircox.player },
|
||||
},
|
||||
|
||||
methods: {
|
||||
@ -50,8 +51,8 @@ export default {
|
||||
},
|
||||
|
||||
togglePlay(index) {
|
||||
if(this.player.isPlaying(this.set.get(index)))
|
||||
this.player.pause();
|
||||
if(this.player_.isPlaying(this.set.get(index)))
|
||||
this.player_.pause();
|
||||
else
|
||||
this.select(index)
|
||||
},
|
||||
|
Reference in New Issue
Block a user