music mode

This commit is contained in:
草莓 2025-01-11 16:07:49 +08:00
parent 7ac77f58aa
commit 7a06a219bb

View File

@ -14314,7 +14314,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
})
audio.addEventListener('ended', function () {
console.log(1)
switch (main.core.ui.music.type) {
case 'danqu':
audio.currentTime = 0
@ -14576,16 +14575,20 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
}
}
mousemove(px, py) {
if (ischange) {
const time = Math.min(Math.max(Math.floor((px - 100) / 600 * audio.duration), 0), audio.duration)
if (core.domStyle.isVertical) {
audio.currentTime = time
} else {
if (ischange) {
const time = Math.min(Math.max(Math.floor((px - 100) / 600 * audio.duration), 0), audio.duration)
}
if (isvolume) {
const time = Math.min(Math.max((px - 100) / 600, 0), 1)
audio.volume = time
audio.currentTime = time
}
if (isvolume) {
const time = Math.min(Math.max((px - 100) / 600, 0), 1)
audio.volume = time
}
}
}