Initial commit
This commit is contained in:
36
plugins/player.ts
Normal file
36
plugins/player.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
/** 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
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user