mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-14 23:17:19 +00:00
fix seek
This commit is contained in:
parent
ffcc0070a0
commit
24ef21e6ba
@ -121,8 +121,7 @@ export default defineStore("Queue", {
|
|||||||
},
|
},
|
||||||
seek(pos: number) {
|
seek(pos: number) {
|
||||||
try {
|
try {
|
||||||
const a = (pos / 100) * this.audio.duration;
|
this.audio.currentTime = pos;
|
||||||
this.audio.currentTime = a;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof TypeError) {
|
if (error instanceof TypeError) {
|
||||||
console.error("Seek error: no audio");
|
console.error("Seek error: no audio");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user