mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-07 18:47:50 +08:00
fix(player): suppress volume indicator during audio duck events (#1899)
When using AAudio output on Android, the system notifies the app to manually handle ducking instead of silently lowering volume itself. This caused the in-app volume indicator to pop up on every notification. Pass showIndicator: false for duck begin/end calls so volume is adjusted silently, consistent with other audio output modes.
This commit is contained in:
@@ -28,6 +28,7 @@ class AudioSessionHandler {
|
||||
case AudioInterruptionType.duck:
|
||||
PlPlayerController.setVolumeIfExists(
|
||||
(PlPlayerController.getVolumeIfExists() ?? 0) * 0.5,
|
||||
showIndicator: false,
|
||||
);
|
||||
// player.setVolume(player.volume.value * 0.5);
|
||||
break;
|
||||
@@ -47,6 +48,7 @@ class AudioSessionHandler {
|
||||
case AudioInterruptionType.duck:
|
||||
PlPlayerController.setVolumeIfExists(
|
||||
(PlPlayerController.getVolumeIfExists() ?? 0) * 2,
|
||||
showIndicator: false,
|
||||
);
|
||||
// player.setVolume(player.volume.value * 2);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user