forked from FoundKeyGang/FoundKey
make patterns display when seeking on stopped track
This commit is contained in:
parent
54f0b67b25
commit
e4042534a5
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue