Add player component and integrate into app layout
This commit is contained in:
1 parent
5b3ce94494
commit
d0d06f1513
4 files changed
+53
-1
No files matched your search
+14
-1
@@ -1,5 +1,18 @@
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
const player = usePlayer()
|
||||
|
||||
const { data } = useApiFetch("/all/tracks")
|
||||
|
||||
const play = () => {
|
||||
player.addToQueue(data.value[0])
|
||||
player.play()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Button @click="play">Test play</Button>
|
||||
|
||||
<AlbumSlider />
|
||||
|
||||
<div :style="{ height: '100vh' }"></div>
|
||||
</template>
|
||||
Reference in new issue
Block a user