make patterns display when seeking on stopped track

This commit is contained in:
Puniko 2022-12-29 21:37:33 +01:00
parent 54f0b67b25
commit e4042534a5

View file

@ -85,6 +85,7 @@ player.value.load(props.module.url).then((result) => {
buffer = result;
try {
player.value.play(buffer);
progress.value.max = player.value.duration();
display();
} catch (e) {
console.warn(e);
@ -138,8 +139,15 @@ function initSeek() {
}
function performSeek() {
const noNode = !player.value.currentPlayingNode;
if (noNode) {
player.value.play(buffer);
}
player.value.seek(position.value);
display();
if (noNode) {
player.value.stop();
}
isSeeking = false;
}