Fixed playlist reordering #112

This commit is contained in:
Shiny Nematoda 2023-03-28 06:51:53 +00:00
parent aefb5f8fdf
commit 1f68a5c9f0
6 changed files with 149 additions and 142 deletions

View file

@ -119,8 +119,10 @@ async function Stream() {
}
function destroy() {
window.audioPlayer.destroy();
window.audioPlayer = undefined;
if (window.audioPlayer) {
window.audioPlayer.destroy();
window.audioPlayer = undefined;
}
}
watch(
@ -194,10 +196,10 @@ onMounted(() => {
});
onBeforeUnmount(() => {
if (window.audioPlayer) destroy();
destroy();
});
onUnmounted(() => {
if (window.audioPlayer) destroy();
destroy();
});
</script>