Skip to content

Commit

Permalink
Set the default volume to 66%.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 25af26af3151b261d7a77718cc981a36c3eb08b6
  • Loading branch information
cpojer committed Nov 29, 2024
1 parent e6abc1c commit 84f1fab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/AudioPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ const getVolume = (type: AudioVolumeType) => {
return Number.isFinite(volume) && volume >= 0 && volume <= 1 ? volume : 1;
};

Howler.volume(getVolume('master') ?? 0.5);
const hasMasterVolume = () => localStorage.getItem(storageKeys.master) !== null;

Howler.volume(hasMasterVolume() ? getVolume('master') : 0.66);

const audioPlayer = new AudioPlayer(new Map([...Music, ...Sounds]));

Expand Down

0 comments on commit 84f1fab

Please sign in to comment.