mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-01-26 19:09:45 +00:00
fix audio notification for Gradio 4 (#1208)
the AUDIO element is now in the shadow DOM, so access it there to trigger playback
This commit is contained in:
@@ -26,7 +26,7 @@ onAfterUiUpdate(function() {
|
||||
lastHeadImg = headImg;
|
||||
|
||||
// play notification sound if available
|
||||
const notificationAudio = gradioApp().querySelector('#audio_notification audio');
|
||||
const notificationAudio = gradioApp().querySelector('#audio_notification #waveform > div')?.shadowRoot?.querySelector('audio');
|
||||
if (notificationAudio) {
|
||||
notificationAudio.volume = opts.notification_volume / 100.0 || 1.0;
|
||||
notificationAudio.play();
|
||||
|
||||
Reference in New Issue
Block a user