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;
|
buffer = result;
|
||||||
try {
|
try {
|
||||||
player.value.play(buffer);
|
player.value.play(buffer);
|
||||||
|
progress.value.max = player.value.duration();
|
||||||
display();
|
display();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn(e);
|
console.warn(e);
|
||||||
|
@ -138,8 +139,15 @@ function initSeek() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function performSeek() {
|
function performSeek() {
|
||||||
|
const noNode = !player.value.currentPlayingNode;
|
||||||
|
if (noNode) {
|
||||||
|
player.value.play(buffer);
|
||||||
|
}
|
||||||
player.value.seek(position.value);
|
player.value.seek(position.value);
|
||||||
display();
|
display();
|
||||||
|
if (noNode) {
|
||||||
|
player.value.stop();
|
||||||
|
}
|
||||||
isSeeking = false;
|
isSeeking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue