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:
Starfallen
2026-04-24 12:36:50 +08:00
committed by GitHub
parent 73484f1f72
commit 91f00173bb
2 changed files with 11 additions and 4 deletions

View File

@@ -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;