mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
Add option to set notification sound volume
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user