新增播放器声音大小、静音、播放进度控制(#2386)
This commit is contained in:
@@ -65,6 +65,8 @@ export const initGlobalData = () => {
|
||||
lyricLineAllText: '',
|
||||
lyric: '',
|
||||
collect: false,
|
||||
volume: 0,
|
||||
mute: false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -230,6 +232,15 @@ export const listenerAppEvent = (startApp: () => void) => {
|
||||
global.lx.theme.shouldUseDarkColors = shouldUseDarkColors
|
||||
global.lx?.event_app.system_theme_change(shouldUseDarkColors)
|
||||
})
|
||||
|
||||
global.lx.event_app.on('updated_config', (config, setting) => {
|
||||
if (config.includes('player.volume')) {
|
||||
global.lx.event_app.player_status({ volume: Math.trunc(setting['player.volume']! * 100) })
|
||||
}
|
||||
if (config.includes('player.isMute')) {
|
||||
global.lx.event_app.player_status({ mute: setting['player.isMute'] })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const initTheme = () => {
|
||||
|
||||
Reference in New Issue
Block a user