fix(player): 静音保留原音量,解除后可恢复

- playerCore 新增持久化 isMuted 状态及 setMuted/toggleMute,静音时音频输出置 0 但 volume 保持不变
- 音量 > 0 时自动解除静音
- useVolumeControl 移除原 0↔30 切换;滑块/百分比展示真实音量,图标反映静音态
- 三个播放栏的音量滑块在静音时 disabled;PlayBar 百分比文字同步置灰(仅文字颜色)
This commit is contained in:
chengww
2026-04-26 21:47:11 +08:00
parent 97220761cf
commit 2b1024ca24
6 changed files with 84 additions and 16 deletions
+4
View File
@@ -41,6 +41,7 @@ export const usePlayerStore = defineStore('player', () => {
musicFull,
playbackRate,
volume,
isMuted,
userPlayIntent,
isFmPlaying
} = storeToRefs(playerCore);
@@ -97,6 +98,7 @@ export const usePlayerStore = defineStore('player', () => {
musicFull,
playbackRate,
volume,
isMuted,
userPlayIntent,
isFmPlaying,
@@ -113,6 +115,8 @@ export const usePlayerStore = defineStore('player', () => {
getVolume: playerCore.getVolume,
increaseVolume: playerCore.increaseVolume,
decreaseVolume: playerCore.decreaseVolume,
setMuted: playerCore.setMuted,
toggleMute: playerCore.toggleMute,
handlePause: playerCore.handlePause,
// ========== 播放列表管理 (Playlist) ==========