新增播放器声音大小、静音、播放进度控制(#2386)

This commit is contained in:
lyswhut
2025-05-10 00:58:19 +08:00
parent 2ccca633ed
commit 021f89da29
7 changed files with 69 additions and 6 deletions
@@ -81,7 +81,7 @@ export default () => {
// buttons.lockLrc = setting.desktopLyric.isLock
// setButtons()
// }
const rTaskbarThumbarClick = onPlayerAction(async({ params: action }) => {
const rTaskbarThumbarClick = onPlayerAction(async({ params: { action, data } }) => {
switch (action) {
case 'play':
play()
@@ -105,6 +105,19 @@ export default () => {
void removeListMusics({ listId: loveList.id, ids: ['progress' in playMusicInfo.musicInfo ? playMusicInfo.musicInfo.metadata.musicInfo.id : playMusicInfo.musicInfo.id] })
if (await updateCollectStatus()) sendPlayerStatus({ collect })
break
case 'seek': {
let progress = data as number
if (progress < 0) progress = 0
else if (progress > playProgress.maxPlayTime) progress = playProgress.maxPlayTime
window.app_event.setProgress(progress)
break
}
case 'mute':
window.app_event.setVolumeIsMute(data as boolean)
break
case 'volume':
window.app_event.setVolume(data as number)
break
// case 'lrc':
// setVisibleDesktopLyric(true)
// updateSetting()