Skip to content

Unrestricted Open-source alternative to AI video platforms — Free AI image & video generation studio with 600+ models (Flux, Midjourney, Kling, Sora, Veo). No content filters. Self-hosted, MIT licensed.

718 B
Raw Blame
import { getVideoWorkflowMediaSlots } from "./videoWorkflows.js";

export function getVideoDurationLabel(value, copy) {
  return copy.durationLabels?.[value] || `${value}s`;
}

export function getVideoAspectRatioLabel(value, copy) {
  return copy.aspectRatioLabels?.[value] || value;
}

export function getVideoModeDescription(model, workflowId, copy) {
  const description = copy.modeDescriptions[workflowId || "text"];
  if (workflowId !== "references" || !model) return description;

  const media = [...new Set(getVideoWorkflowMediaSlots(model, workflowId)
    .map((slot) => copy.referenceMediaTypes[slot.mediaType]))].join(" · ");
  return `${description} ${copy.referenceSupport.replace("{media}", media)}`;
}