Added shuffle and repeating
This commit is contained in:
1 parent
53e584b528
commit
43f2634660
2 files changed
+17
-3
No files matched your search
@@ -146,6 +146,10 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
sound.value = null
|
||||
}
|
||||
|
||||
const shuffle = () => {
|
||||
queue.value.sort(() => Math.random() - 0.5)
|
||||
}
|
||||
|
||||
// Info
|
||||
const getDuration = () =>
|
||||
new Promise<number>((resolve) => {
|
||||
@@ -174,6 +178,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
prev,
|
||||
addToQueue,
|
||||
clear,
|
||||
shuffle,
|
||||
getDuration,
|
||||
getSecondsPlayed,
|
||||
setSecondsPlayed,
|
||||
|
||||
Reference in new issue
Block a user