Skip to content

Commit

Permalink
Fade sounds based on the current volume, not the full volume.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 9993f98796a988466aeda8766eb98edcfba4af3a
  • Loading branch information
cpojer committed Nov 29, 2024
1 parent be6f390 commit 2720fb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class AudioPlayer {
const instance = this.getInstance(name);
instance.off('fade');
if (instance.playing() && duration > 0) {
instance.fade(1, 0, duration);
instance.fade(instance.volume() || 1, 0, duration);
instance.once('fade', () => instance.stop());
} else {
instance.stop();
Expand Down

0 comments on commit 2720fb3

Please sign in to comment.