minor fix marketplace + xyi ego znaet
This commit is contained in:
13
src/renderer/utils/sounds.ts
Normal file
13
src/renderer/utils/sounds.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import buySound from '../assets/sounds/buy.mp3';
|
||||
|
||||
let buyAudio: HTMLAudioElement | null = null;
|
||||
|
||||
export const playBuySound = () => {
|
||||
if (!buyAudio) {
|
||||
buyAudio = new Audio(buySound);
|
||||
buyAudio.volume = 0.6;
|
||||
}
|
||||
|
||||
buyAudio.currentTime = 0;
|
||||
buyAudio.play().catch(() => {});
|
||||
};
|
||||
Reference in New Issue
Block a user