21 lines
573 B
JavaScript
21 lines
573 B
JavaScript
import {defineStore} from "pinia";
|
|
|
|
export const useAudioPlayerStore = defineStore("AudioPlayerStore", {
|
|
state: () => ({
|
|
"soundcloud_trackid": "undefined",
|
|
"currentTrackTitle": ""
|
|
}),
|
|
actions: {
|
|
setSoundCloudTrackID(trackid, title = "") {
|
|
if (typeof trackid !== 'undefined') {
|
|
this.soundcloud_trackid = trackid
|
|
this.currentTrackTitle = title
|
|
}
|
|
},
|
|
clearSoundCloudTrackID() {
|
|
this.soundcloud_trackid = 'undefined'
|
|
this.currentTrackTitle = ""
|
|
}
|
|
}
|
|
})
|