From 99d3e2d95f90f6be762ea61d36126b3c2bbdc17b Mon Sep 17 00:00:00 2001 From: Royce Schultz Date: Mon, 7 Jul 2025 17:30:52 -0600 Subject: [PATCH] Update docs with info about custom sounds. --- README.md | 4 ++++ web/util.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 663a34a..c24ad52 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ Sends a system notification via the browser. Plays a chime sound to notify the user. +By default, the selected sound file is at [`custom_nodes/ComfyUI-Notifications/web/assets/notify.mp3`](web/assets/). You can add custom sounds to this directory and change the file name in the node settings to play a different sound. + +Alternatively, you can use a URL to an audio file. Simply enter the URL in the `file` field. + diff --git a/web/util.js b/web/util.js index ff223ae..673edd1 100644 --- a/web/util.js +++ b/web/util.js @@ -29,7 +29,7 @@ export const playSound = (file, volume) => { if (!file) { file = 'notify.mp3' } - if (!file.startsWith('http')) { + if (!(file.startsWith('http') || file.startsWith('https'))) { if (!file.includes('/')) { file = 'assets/' + file }