mindboost-rnbo-test-project/plugins/player.ts

37 lines
823 B
TypeScript

/** Dieses Plugin deckt die Applikationslogik für den Player ab. Dadurch soll verhindert werden, dass Logik in Componenten verbaut ist,
* die durch die mount und unmount Mechanismen durcheinander kommen würden. Das Plugin arbeitet eng mit dem audio-Store zusammen.
*
* Die benötigten Funktionen für die Navigationbar sowie das PlayerControls-Composable sind changeTrack zum Wechseln des Soundscapes
* inklusive der Interaktion mit dem Backend.
*
**/
export default defineNuxtPlugin(async () => {
const play = async () => {
}
const pause = async () => {
}
const next = async () => {
}
const previous = async () => {
}
// Expose methods to components
return {
provide: {
play,
pause,
next,
previous,
stop
}
}
})