feat(device): 增加耳机最大音量限制及显示提示
- 新增 getHomeVolumeMax 函数,计算耳机输出的最大允许音量 - 新增 getHeadphoneMaxVolumeDb 函数,获取耳机最大音量的 dB 值用于提示显示 - 修改 setVolume 函数,限制音量在动态最大值范围内,防止首页入口发送超限音量 - Home 页面音量滑块、旋钮角度及音量范围由固定 200 调整为当前设备最大音量 - 添加耳机最大音量提示文本,根据用户设置动态显示最大 dB 值 - 各语言文件新增耳机最大音量提示相关文案 - 优化实现,防止拖动时音量显示超出最大音量限制
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
"volumeMaxConfirmOk": "Set to maximum",
|
||||
"volumePassthroughLockedToast": "Volume is in passthrough mode and cannot be adjusted.",
|
||||
"volumePassthroughLockedHint": "Volume is in passthrough mode and cannot be adjusted.",
|
||||
"hpMaxVolumeHint": "Headphone max volume is set. Maximum: {db}dB",
|
||||
"powerOffToastDemo": "Demo mode: shutdown command sent.",
|
||||
"powerOffToastSent": "Shutdown command sent.",
|
||||
"doubleClickHint": "Double-click to enter",
|
||||
|
||||
Reference in New Issue
Block a user