I am using Electron 8.0.3 and I am trying to play a custom sound. Here's what I am doing:
const notif = new Notification({
title: 'Finished Download',
body: 'test',
sound: 'vapp/assets/sounds/mighty_sound.mp3',
});
notif.show();
It doesn't seem to play that sound but instead a default macOS sound. I've tried:
- Using a absolute path like
'/Users/<name>/Desktop/workspace/proj/vapp/assets/sounds/sound.mp3' - Packaging the application so that the sound is bundled
- Playing different file types: .wav, .mp3, .aiff
- Choosing other macOS sounds that might exist in
/System/Library/Sounds
For whatever reason, it plays the same sound.
I have referenced this documentation