整理事件代码

pull/733/head
lyswhut 2021-12-14 20:24:11 +08:00
parent 583e8c43d6
commit 9075b6629f
1 changed files with 23 additions and 20 deletions

View File

@ -11,28 +11,31 @@ const names = {
set_hot_key_config: 'set_hot_key_config', set_hot_key_config: 'set_hot_key_config',
}, },
player: { player: {
playMusic: 'playMusic', setTogglePlay: 'setTogglePlay', // 播放/暂停切换
setTogglePlay: 'setTogglePlay', setPause: 'setPause', // 暂停
setProgress: 'setProgress', setStop: 'setStop', // 停止
play: 'play', setPlayPrev: 'setPlayPrev', // 上一曲
pause: 'pause', setPlayNext: 'setPlayNext', // 下一曲
setPause: 'setPause', setProgress: 'setProgress', // 设置播放进度
stop: 'stop', setVolume: 'setVolume', // 设置音量
setStop: 'setStop', toggleMute: 'toggleMute', // 静音切换
error: 'error',
setPlayPrev: 'setPlayPrev',
setPlayNext: 'setPlayNext',
playMusic: 'playMusic',
setPlayInfo: 'setPlayInfo',
updatePic: 'updatePic', updatePic: 'updatePic',
updateLyric: 'updateLyric', updateLyric: 'updateLyric',
setPlayInfo: 'setPlayInfo',
activeTransition: 'activeTransition', activeTransition: 'activeTransition', // 激活进度条动画事件
setVolume: 'setVolume', // 播放器事件
toggleMute: 'toggleMute', play: 'play',
volume: 'volume', pause: 'pause',
stop: 'stop',
error: 'error',
// 播放器原始事件
player_playing: 'player_playing', player_playing: 'player_playing',
player_pause: 'player_pause', player_pause: 'player_pause',
player_stop: 'player_stop', player_stop: 'player_stop',
@ -45,12 +48,12 @@ const names = {
player_waiting: 'player_waiting', player_waiting: 'player_waiting',
}, },
list: { list: {
saveMyList: 'saveMyList', saveMyList: 'saveMyList', // 列表保存事件
listChange: 'listChange', listChange: 'listChange', // 列表改变事件
musicInfoChange: 'musicInfoChange', musicInfoChange: 'musicInfoChange', // 列表里的音乐信息改变事件
}, },
download: { download: {
listChange: 'listChange', listChange: 'listChange', // 列表改变事件
}, },
sync: { sync: {
send_action_list: 'send_action_list', send_action_list: 'send_action_list',