fix(video): double preview on the upload loader

ComfyUI core (frontend 1.42.x) natively renders a node's `ui.gifs` output
as a media preview, so our own JS preview widget produced a second one.
Return the preview under a custom `universr_videos` key that core ignores;
our web extension is now the only thing that renders it — single preview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 13:46:29 +02:00
parent fd5922b1cd
commit 9a901adcc5
2 changed files with 9 additions and 6 deletions
+3 -2
View File
@@ -63,8 +63,9 @@ function addVideoPreview(nodeType) {
const onExecuted = node.onExecuted;
node.onExecuted = function (output) {
onExecuted?.apply(this, arguments);
if (output?.gifs?.[0]) {
const g = output.gifs[0];
// custom key (see nodes_video.py) — core ignores it, so we render it once
const g = output?.universr_videos?.[0];
if (g) {
const params = new URLSearchParams({
filename: g.filename,
type: g.type || "temp",