LoadAudio restores file value from workflow

This commit is contained in:
christian-byrne 2024-07-17 08:26:28 -07:00
parent 281ad42df4
commit b342654b5f

View File

@ -150,6 +150,15 @@ app.registerExtension({
} }
audioWidget.callback = onAudioWidgetUpdate audioWidget.callback = onAudioWidgetUpdate
// Load saved audio file widget values if restoring from workflow
const onGraphConfigured = node.onGraphConfigured;
node.onGraphConfigured = () => {
onGraphConfigured?.apply(this, arguments)
if (audioWidget.value) {
onAudioWidgetUpdate()
}
}
const fileInput = document.createElement("input") const fileInput = document.createElement("input")
fileInput.type = "file" fileInput.type = "file"
fileInput.accept = "audio/*" fileInput.accept = "audio/*"