This commit is contained in:
Chenlei Hu
2024-07-19 15:47:43 -04:00
committed by GitHub
parent 631a060fff
commit 050fd4eb32

View File

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