From 4b1bf29ea00286555875c2d50f474b97bceafcb3 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 7 Mar 2021 17:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=90=AF=E5=8A=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0`-dhmkh`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FAQ.md | 6 ++++++ README.md | 2 ++ publish/changeLog.md | 4 ++++ src/main/index.js | 2 ++ 4 files changed, 14 insertions(+) diff --git a/FAQ.md b/FAQ.md index 61882e17..2a3b6d0f 100644 --- a/FAQ.md +++ b/FAQ.md @@ -123,6 +123,12 @@ Windows 7 未开启 Aero 效果时桌面歌词会有问题,详情看下面的 尝试更换网络,如切换到移动网络。 +### 启用软件时导致耳机意外关机 + +据反馈,漫步者部分型号的耳机与本软件一起使用时将会导致耳机意外关机, +详情看:, +若出现该问题可尝试添加`-dhmkh`启动参数解决,启动参数添加方法请自行百度“windows给应用程序加启动参数的方法”。 + ### 其他错误 按照前面的 "歌曲无法试听与下载" 方案解决。 diff --git a/README.md b/README.md index 4fe4d8f7..bd11c2e4 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ npm run pack:linux - `-search` 启动软件时自动在搜索框搜索指定的内容,例如:`-search="突然的自我 - 伍佰"` - `-dha` 禁用硬件加速启动(Disable Hardware Acceleration),窗口显示有问题时可以尝试添加此参数启动(v1.6.0起新增) - `-dt` 以非透明模式启动(Disable Transparent),对于未开启AERO效果的win7系统可加此参数启动以确保界面正常显示(注:该参数对桌面歌词无效),原来的`-nt`参数已重命名为`-dt`(v1.6.0起重命名) +- `-dhmkh` 禁用硬件媒体密钥处理(Disable Hardware Media Key Handling),此选项将禁用Chromium的Hardware Media Key Handling特性(v1.8.1起新增) - `-play` 启动时播放指定列表的音乐,参数说明: - `type`:播放类型,目前固定为`songList` - `source`:播放源,可用值为`kw/kg/tx/wy/mg/myList`,其中`kw/kg/tx/wy/mg`对应各源的在线列表,`myList`为本地列表 @@ -90,6 +91,7 @@ npm run pack:linux - `name`:要播放的本地列表歌单名字,source为`myList`时必传,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表" - `index`:从列表的哪个位置开始播放,选传,若不传默认播放第一首歌曲,举例:`./lx-music-desktop -play="type=songList&source=myList&name=默认列表&index=2" + ### 常见问题 常见问题已移至: diff --git a/publish/changeLog.md b/publish/changeLog.md index 68c9c707..b48a9b21 100644 --- a/publish/changeLog.md +++ b/publish/changeLog.md @@ -1,3 +1,7 @@ +### 新增 + +- 新增启动参数`-dhmkh`,此参数将禁用软件对系统媒体按键的处理,用于解决漫步者部分型号耳机与本程序冲突导致耳机意外关机的问题 + ### 修复 - 修复歌词翻译的主题颜色适配问题 diff --git a/src/main/index.js b/src/main/index.js index e4544b34..81b6b1f1 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -29,6 +29,8 @@ require('./env') // Is disable hardware acceleration if (global.envParams.cmdParams.dha) app.disableHardwareAcceleration() if (global.envParams.cmdParams.dt == null && global.envParams.cmdParams.nt != null) global.envParams.cmdParams.dt = global.envParams.cmdParams.nt +if (global.envParams.cmdParams.dhmkh) app.commandLine.appendSwitch('disable-features', 'HardwareMediaKeyHandling') + // https://github.com/electron/electron/issues/22691 app.commandLine.appendSwitch('wm-window-animations-disabled')