test promise in playing audio

This commit is contained in:
geoffrey45
2021-12-28 10:43:42 +03:00
parent c49e1e48f1
commit 741e34c5ee
4 changed files with 46 additions and 37 deletions
+9
View File
@@ -58,6 +58,7 @@
import { ref, toRefs } from "@vue/reactivity";
import perks from "@/composables/perks.js";
import audio from "@/composables/playAudio.js";
import { watch } from "@vue/runtime-core";
export default {
props: ["up_next"],
@@ -72,6 +73,14 @@ export default {
emit("expandQueue");
};
watch(is_expanded, (newVal) => {
if (newVal) {
setTimeout(() => {
perks.focusCurrent();
}, 1000);
}
});
const { playNext } = audio;
const { playAudio } = audio;