diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2024-01-01 13:39:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 13:39:51 +0000 |
commit | dfd64382211317cc46ad337c373492bfc420fa18 (patch) | |
tree | 3b1b2f5f3648da07430f54d1c155ce379a6fa3f7 /javascript/notification.js | |
parent | 3d15e58b0a30f2ef1e731f9e429f4d3cf1c259c5 (diff) | |
parent | 0ce67cb61806cf43f4d726d4705a4f6fdc2540e6 (diff) | |
download | stable-diffusion-webui-gfx803-dfd64382211317cc46ad337c373492bfc420fa18.tar.gz stable-diffusion-webui-gfx803-dfd64382211317cc46ad337c373492bfc420fa18.tar.bz2 stable-diffusion-webui-gfx803-dfd64382211317cc46ad337c373492bfc420fa18.zip |
Merge branch 'dev' into feat/interrupted-end
Diffstat (limited to 'javascript/notification.js')
-rw-r--r-- | javascript/notification.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/javascript/notification.js b/javascript/notification.js index 6d799561..3ee972ae 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -26,7 +26,11 @@ onAfterUiUpdate(function() { lastHeadImg = headImg; // play notification sound if available - gradioApp().querySelector('#audio_notification audio')?.play(); + const notificationAudio = gradioApp().querySelector('#audio_notification audio'); + if (notificationAudio) { + notificationAudio.volume = opts.notification_volume / 100.0 || 1.0; + notificationAudio.play(); + } if (document.hasFocus()) return; |