mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-23 02:41:02 +00:00
feat: use sound lib
This commit is contained in:
@@ -8,6 +8,7 @@ import { Toast } from "powertoast";
|
||||
import fs from "node:fs";
|
||||
import axios from "axios";
|
||||
import path from "node:path";
|
||||
import sound from "sound-play";
|
||||
|
||||
const getGameIconNativeImage = async (gameId: number) => {
|
||||
try {
|
||||
@@ -100,11 +101,15 @@ export const publishNewAchievementNotification = async (achievement: {
|
||||
title: "New achievement unlocked",
|
||||
message: achievement.displayName,
|
||||
icon: iconPath,
|
||||
sound: true,
|
||||
audio: "ms-appx:///resources/achievement.wav",
|
||||
silent: true,
|
||||
progress: {
|
||||
value: 30,
|
||||
valueOverride: "30/100 achievements",
|
||||
},
|
||||
}).show();
|
||||
|
||||
const audioPath = path.join(app.getAppPath(), "resources", "achievement.wav");
|
||||
|
||||
console.log(audioPath);
|
||||
sound.play(audioPath);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user