Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

546 B
Raw Blame
import { useI18n } from "../../i18n/I18n";
function formatEta(ms: number): string {
  const s = Math.round(ms / 1000);
  return s < 60 ? `${s}s` : `${Math.floor(s / 60)}m ${s % 60}s`;
}

export function RenderDurationNote({
  durationMs,
  isRendering,
}: {
  durationMs?: number;
  isRendering: boolean;
}) {
  const { t } = useI18n();
  if (durationMs === undefined || isRendering) return null;
  return (
    <p className="text-step-9 text-text-5 text-center -mt-1.5">
      {t("Last render took")}{" "}{formatEta(durationMs)}
    </p>
  );
}