From 7a06a219bbda9e50c6e9664fc33dc0e5e2b6c2ff Mon Sep 17 00:00:00 2001 From: strawberry42271 <2806566736@qq.com> Date: Sat, 11 Jan 2025 16:07:49 +0800 Subject: [PATCH] music mode --- project/plugins.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/project/plugins.js b/project/plugins.js index 9856fd0..cba89fb 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -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 + + } } }