Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1803f7ca5f |
+19
-4
@@ -51,6 +51,7 @@ async function uploadFile(file, updateNode, node, pasted = false) {
|
|||||||
|
|
||||||
function addVideo(node, name,src, app) {
|
function addVideo(node, name,src, app) {
|
||||||
console.log(src)
|
console.log(src)
|
||||||
|
|
||||||
const MIN_SIZE = 50;
|
const MIN_SIZE = 50;
|
||||||
function computeSize(size) {
|
function computeSize(size) {
|
||||||
try{
|
try{
|
||||||
@@ -264,7 +265,7 @@ function addVideo(node, name,src, app) {
|
|||||||
export function showVideoInput(name,node) {
|
export function showVideoInput(name,node) {
|
||||||
const videoWidget = node.widgets.find((w) => w.name === "videoWidget");
|
const videoWidget = node.widgets.find((w) => w.name === "videoWidget");
|
||||||
const temp_web_url = node.widgets.find((w) => w.name === "local_url");
|
const temp_web_url = node.widgets.find((w) => w.name === "local_url");
|
||||||
|
///const videoContainer = videoWidget.inputEl.widgets.find((w) => w.name === "videoWidget");
|
||||||
|
|
||||||
let folder_separator = name.lastIndexOf("/");
|
let folder_separator = name.lastIndexOf("/");
|
||||||
let subfolder = "n-suite";
|
let subfolder = "n-suite";
|
||||||
@@ -289,7 +290,9 @@ export function showVideoInput(name,node) {
|
|||||||
|
|
||||||
if (prev_format == current_format) {
|
if (prev_format == current_format) {
|
||||||
//update
|
//update
|
||||||
document.getElementById("mediaContainer").src = url_video
|
|
||||||
|
console.log(videoWidget.inputEl)//..getElementById("mediaContainer")
|
||||||
|
//videoWidget.inputEl.children[1].src = url_video
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
let newElement;
|
let newElement;
|
||||||
@@ -320,8 +323,20 @@ export function showVideoInput(name,node) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let newEl= document.createElement("div");
|
||||||
|
Object.assign(newEl, {
|
||||||
|
id: "videoContainer",
|
||||||
|
width: 400,
|
||||||
|
height: 300
|
||||||
|
})
|
||||||
|
|
||||||
document.getElementById("videoContainer").replaceChild(newElement,document.getElementById("mediaContainer"));
|
newEl.appendChild(newElement);
|
||||||
|
|
||||||
|
videoWidget.lastChilds = newEl;
|
||||||
|
console.log(videoWidget)
|
||||||
|
console.log("ssssssssss")
|
||||||
|
//document.getElementById("videoContainer")
|
||||||
|
//videoWidget.inputEl.children[0].replaceChild(newElement,videoWidget.inputEl.children[1]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -335,7 +350,7 @@ export function showVideoInput(name,node) {
|
|||||||
|
|
||||||
export function showVideoOutput(name,node) {
|
export function showVideoOutput(name,node) {
|
||||||
const videoWidget = node.widgets.find((w) => w.name === "videoOutWidget");
|
const videoWidget = node.widgets.find((w) => w.name === "videoOutWidget");
|
||||||
|
console.log(name)
|
||||||
|
|
||||||
|
|
||||||
let folder_separator = name.lastIndexOf("/");
|
let folder_separator = name.lastIndexOf("/");
|
||||||
|
|||||||
+1
-1
@@ -613,7 +613,7 @@ class LoadFramesFromFolder:
|
|||||||
|
|
||||||
def load_images(self, folder,fps,loop_for_gif,duration_for_gif):
|
def load_images(self, folder,fps,loop_for_gif,duration_for_gif):
|
||||||
image_list = []
|
image_list = []
|
||||||
METADATA = [fps, len(os.listdir(folder))]
|
METADATA = [fps, len(os.listdir(folder)),loop_for_gif,duration_for_gif]
|
||||||
|
|
||||||
images = [os.path.join(folder, filename) for filename in os.listdir(folder) if filename.endswith(".png")]
|
images = [os.path.join(folder, filename) for filename in os.listdir(folder) if filename.endswith(".png")]
|
||||||
images.sort(key=lambda f: int(''.join(filter(str.isdigit, f))))
|
images.sort(key=lambda f: int(''.join(filter(str.isdigit, f))))
|
||||||
|
|||||||
Reference in New Issue
Block a user