2026-02-18 03:06:14 +01:00
|
|
|
import {defineStore} from "pinia";
|
|
|
|
|
|
|
|
|
|
export const useAudioPlayerStore = defineStore("AudioPlayerStore", {
|
2026-03-07 13:16:46 +01:00
|
|
|
state: () => ({
|
|
|
|
|
"soundcloud_trackid": "undefined",
|
|
|
|
|
"currentTrackTitle": ""
|
|
|
|
|
}),
|
2026-02-18 03:06:14 +01:00
|
|
|
actions: {
|
2026-03-07 13:16:46 +01:00
|
|
|
setSoundCloudTrackID(trackid, title = "") {
|
2026-02-18 03:06:14 +01:00
|
|
|
if (typeof trackid !== 'undefined') {
|
|
|
|
|
this.soundcloud_trackid = trackid
|
2026-03-07 13:16:46 +01:00
|
|
|
this.currentTrackTitle = title
|
2026-02-18 03:06:14 +01:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
clearSoundCloudTrackID() {
|
|
|
|
|
this.soundcloud_trackid = 'undefined'
|
2026-03-07 13:16:46 +01:00
|
|
|
this.currentTrackTitle = ""
|
2026-02-18 03:06:14 +01:00
|
|
|
}
|
|
|
|
|
}
|
2026-03-07 13:16:46 +01:00
|
|
|
})
|